<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998

Renaming of patterns

Basically dependency analysis.

Handles @Match@, @GRHSs@, @HsExpr@, and @Qualifier@ datatypes.  In
general, all of these functions return a renamed thing, and a set of
free variables.
-}</span><span>
</span><span id="line-12"></span><span>
</span><span id="line-13"></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-14"></span><span class="hs-pragma">{-# LANGUAGE FlexibleContexts #-}</span><span>
</span><span id="line-15"></span><span class="hs-pragma">{-# LANGUAGE TypeFamilies #-}</span><span>
</span><span id="line-16"></span><span class="hs-pragma">{-# LANGUAGE RankNTypes #-}</span><span>
</span><span id="line-17"></span><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables #-}</span><span>
</span><span id="line-18"></span><span class="hs-pragma">{-# LANGUAGE ViewPatterns #-}</span><span>
</span><span id="line-19"></span><span class="hs-pragma">{-# LANGUAGE DeriveFunctor #-}</span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-uni-patterns   #-}</span><span>
</span><span id="line-22"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-record-updates #-}</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Rename.Pat</span><span> </span><span class="hs-special">(</span><span class="hs-comment">-- main entry points</span><span>
</span><span id="line-25"></span><span>              </span><span class="annot"><a href="GHC.Rename.Pat.html#rnPat"><span class="hs-identifier">rnPat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#rnPats"><span class="hs-identifier">rnPats</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#rnBindPat"><span class="hs-identifier">rnBindPat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier">rnPatAndThen</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span>              </span><span class="annot"><a href="GHC.Rename.Pat.html#NameMaker"><span class="hs-identifier">NameMaker</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#applyNameMaker"><span class="hs-identifier">applyNameMaker</span></a></span><span class="hs-special">,</span><span>     </span><span class="hs-comment">-- a utility for making names:</span><span>
</span><span id="line-28"></span><span>              </span><span class="annot"><a href="GHC.Rename.Pat.html#localRecNameMaker"><span class="hs-identifier">localRecNameMaker</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#topRecNameMaker"><span class="hs-identifier">topRecNameMaker</span></a></span><span class="hs-special">,</span><span>  </span><span class="hs-comment">--   sometimes we want to make local names,</span><span>
</span><span id="line-29"></span><span>                                             </span><span class="hs-comment">--   sometimes we want to make top (qualified) names.</span><span>
</span><span id="line-30"></span><span>              </span><span class="annot"><a href="GHC.Rename.Pat.html#isTopRecNameMaker"><span class="hs-identifier">isTopRecNameMaker</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span>              </span><span class="annot"><a href="GHC.Rename.Pat.html#rnHsRecFields"><span class="hs-identifier">rnHsRecFields</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#HsRecFieldContext"><span class="hs-identifier">HsRecFieldContext</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>              </span><span class="annot"><a href="GHC.Rename.Pat.html#rnHsRecUpdFields"><span class="hs-identifier">rnHsRecUpdFields</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span>              </span><span class="hs-comment">-- CpsRn monad</span><span>
</span><span id="line-36"></span><span>              </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier">CpsRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#liftCps"><span class="hs-identifier">liftCps</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span>              </span><span class="hs-comment">-- Literals</span><span>
</span><span id="line-39"></span><span>              </span><span class="annot"><a href="GHC.Rename.Pat.html#rnLit"><span class="hs-identifier">rnLit</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#rnOverLit"><span class="hs-identifier">rnOverLit</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span>             </span><span class="hs-comment">-- Pattern Error messages that are also used elsewhere</span><span>
</span><span id="line-42"></span><span>             </span><span class="annot"><a href="GHC.Rename.Utils.html#checkTupSize"><span class="hs-identifier">checkTupSize</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#patSigErr"><span class="hs-identifier">patSigErr</span></a></span><span>
</span><span id="line-43"></span><span>             </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span class="hs-comment">-- ENH: thin imports to only what is necessary for patterns</span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><a href="GHC.Rename.Expr.html"><span class="hs-identifier">GHC.Rename.Expr</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Rename.Expr.html#rnLExpr"><span class="hs-identifier">rnLExpr</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><a href="GHC.Rename.Splice.html"><span class="hs-identifier">GHC.Rename.Splice</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Rename.Splice.html#rnSplicePat"><span class="hs-identifier">rnSplicePat</span></a></span><span> </span><span class="hs-special">)</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.html"><span class="hs-identifier">GHC.Hs</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Utils.Monad.html"><span class="hs-identifier">GHC.Tc.Utils.Monad</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Utils.Zonk.html"><span class="hs-identifier">GHC.Tc.Utils.Zonk</span></a></span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Tc.Utils.Zonk.html#hsOverLitName"><span class="hs-identifier">hsOverLitName</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Rename.Env.html"><span class="hs-identifier">GHC.Rename.Env</span></a></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Rename.Fixity.html"><span class="hs-identifier">GHC.Rename.Fixity</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html"><span class="hs-identifier">GHC.Rename.Utils</span></a></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier">HsDocContext</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#newLocalBndrRn"><span class="hs-identifier">newLocalBndrRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#bindLocalNames"><span class="hs-identifier">bindLocalNames</span></a></span><span>
</span><span id="line-60"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#warnUnusedMatches"><span class="hs-identifier">warnUnusedMatches</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#newLocalBndrRn"><span class="hs-identifier">newLocalBndrRn</span></a></span><span>
</span><span id="line-61"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#checkUnusedRecordWildcard"><span class="hs-identifier">checkUnusedRecordWildcard</span></a></span><span>
</span><span id="line-62"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#checkDupNames"><span class="hs-identifier">checkDupNames</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#checkDupAndShadowedNames"><span class="hs-identifier">checkDupAndShadowedNames</span></a></span><span>
</span><span id="line-63"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#checkTupSize"><span class="hs-identifier">checkTupSize</span></a></span><span> </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#unknownSubordinateErr"><span class="hs-identifier">unknownSubordinateErr</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html"><span class="hs-identifier">GHC.Rename.HsType</span></a></span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Names.html"><span class="hs-identifier">GHC.Builtin.Names</span></a></span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html"><span class="hs-identifier">GHC.Types.Name.Set</span></a></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html"><span class="hs-identifier">GHC.Types.Name.Reader</span></a></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.List.SetOps.html"><span class="hs-identifier">GHC.Data.List.SetOps</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Data.List.SetOps.html#removeDups"><span class="hs-identifier">removeDups</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-73"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-74"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Literal.html"><span class="hs-identifier">GHC.Types.Literal</span></a></span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Literal.html#inCharRange"><span class="hs-identifier">inCharRange</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-75"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.html"><span class="hs-identifier">GHC.Builtin.Types</span></a></span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.html#nilDataCon"><span class="hs-identifier">nilDataCon</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html"><span class="hs-identifier">GHC.Core.DataCon</span></a></span><span>
</span><span id="line-77"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.LanguageExtensions.html#"><span class="hs-identifier">GHC.LanguageExtensions</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">LangExt</span></span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span>       </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier">when</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#ap"><span class="hs-identifier">ap</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#guard"><span class="hs-identifier">guard</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-80"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Data.List.NonEmpty.html#"><span class="hs-identifier">Data.List.NonEmpty</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">NE</span></span><span>
</span><span id="line-81"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Ratio.html#"><span class="hs-identifier">Data.Ratio</span></a></span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span class="hs-comment">{-
*********************************************************
*                                                      *
        The CpsRn Monad
*                                                      *
*********************************************************

Note [CpsRn monad]
~~~~~~~~~~~~~~~~~~
The CpsRn monad uses continuation-passing style to support this
style of programming:

        do { ...
           ; ns &lt;- bindNames rs
           ; ...blah... }

   where rs::[RdrName], ns::[Name]

The idea is that '...blah...'
  a) sees the bindings of ns
  b) returns the free variables it mentions
     so that bindNames can report unused ones

In particular,
    mapM rnPatAndThen [p1, p2, p3]
has a *left-to-right* scoping: it makes the binders in
p1 scope over p2,p3.
-}</span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span class="hs-keyword">newtype</span><span> </span><span id="CpsRn"><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-var">CpsRn</span></a></span></span><span> </span><span id="local-6989586621681128901"><span class="annot"><a href="#local-6989586621681128901"><span class="hs-identifier hs-type">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="CpsRn"><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-var">CpsRn</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="unCpsRn"><span class="annot"><span class="annottext">forall b.
CpsRn b -&gt; forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars)
</span><a href="GHC.Rename.Pat.html#unCpsRn"><span class="hs-identifier hs-var hs-var">unCpsRn</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621681128900"><span class="annot"><a href="#local-6989586621681128900"><span class="hs-identifier hs-type">r</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681128901"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681128900"><span class="hs-identifier hs-type">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-113"></span><span>                                            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681128900"><span class="hs-identifier hs-type">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-114"></span><span>        </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681128458"><span id="local-6989586621681128460"><span class="annot"><span class="annottext">(forall a b. (a -&gt; b) -&gt; CpsRn a -&gt; CpsRn b)
-&gt; (forall a b. a -&gt; CpsRn b -&gt; CpsRn a) -&gt; Functor CpsRn
forall a b. a -&gt; CpsRn b -&gt; CpsRn a
forall a b. (a -&gt; b) -&gt; CpsRn a -&gt; CpsRn b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; CpsRn b -&gt; CpsRn a
$c&lt;$ :: forall a b. a -&gt; CpsRn b -&gt; CpsRn a
fmap :: forall a b. (a -&gt; b) -&gt; CpsRn a -&gt; CpsRn b
$cfmap :: forall a b. (a -&gt; b) -&gt; CpsRn a -&gt; CpsRn b
</span><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-115"></span><span>        </span><span class="hs-comment">-- See Note [CpsRn monad]</span><span>
</span><span id="line-116"></span><span>
</span><span id="line-117"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681128447"><span id="local-6989586621681128449"><span id="local-6989586621681128451"><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-118"></span><span>    </span><span id="local-6989586621681128445"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; CpsRn a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621681128444"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681128444"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall r. (a -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn a
forall b.
(forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn b
</span><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-var">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681128443"><span class="annot"><span class="annottext">a -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128443"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128443"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681128444"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-119"></span><span>    </span><span id="local-6989586621681128441"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b. CpsRn (a -&gt; b) -&gt; CpsRn a -&gt; CpsRn b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;*&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CpsRn (a -&gt; b) -&gt; CpsRn a -&gt; CpsRn b
forall (m :: * -&gt; *) a b. Monad m =&gt; m (a -&gt; b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#ap"><span class="hs-identifier hs-var">ap</span></a></span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681128434"><span id="local-6989586621681128436"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-122"></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span id="local-6989586621681128432"><span class="annot"><span class="annottext">forall r. (a -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128432"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681128431"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b. CpsRn a -&gt; (a -&gt; CpsRn b) -&gt; CpsRn b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;&gt;=</span></a></span></span><span> </span><span id="local-6989586621681128430"><span class="annot"><span class="annottext">a -&gt; CpsRn b
</span><a href="#local-6989586621681128430"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn b
forall b.
(forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn b
</span><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-var">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681128429"><span class="annot"><span class="annottext">b -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128429"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(a -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars)
forall r. (a -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128432"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681128428"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681128428"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CpsRn b -&gt; forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars)
forall b.
CpsRn b -&gt; forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars)
</span><a href="GHC.Rename.Pat.html#unCpsRn"><span class="hs-identifier hs-var hs-var">unCpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; CpsRn b
</span><a href="#local-6989586621681128430"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681128428"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">b -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128429"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span id="local-6989586621681128863"><span class="annot"><a href="GHC.Rename.Pat.html#runCps"><span class="hs-identifier hs-type">runCps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128863"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681128863"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-125"></span><span id="runCps"><span class="annot"><span class="annottext">runCps :: forall a. CpsRn a -&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.Pat.html#runCps"><span class="hs-identifier hs-var hs-var">runCps</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span id="local-6989586621681128425"><span class="annot"><span class="annottext">forall r. (a -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128425"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; RnM (a, FreeVars)) -&gt; RnM (a, FreeVars)
forall r. (a -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128425"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681128424"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681128424"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(a, FreeVars) -&gt; RnM (a, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681128424"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="GHC.Types.Name.Set.html#emptyFVs"><span class="hs-identifier hs-var">emptyFVs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span id="local-6989586621681128861"><span class="annot"><a href="GHC.Rename.Pat.html#liftCps"><span class="hs-identifier hs-type">liftCps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128861"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128861"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-128"></span><span id="liftCps"><span class="annot"><span class="annottext">liftCps :: forall a. RnM a -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCps"><span class="hs-identifier hs-var hs-var">liftCps</span></a></span></span><span> </span><span id="local-6989586621681128422"><span class="annot"><span class="annottext">RnM a
</span><a href="#local-6989586621681128422"><span class="hs-identifier hs-var">rn_thing</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall r. (a -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn a
forall b.
(forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn b
</span><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-var">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681128420"><span class="annot"><span class="annottext">a -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128420"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RnM a
</span><a href="#local-6989586621681128422"><span class="hs-identifier hs-var">rn_thing</span></a></span><span> </span><span class="annot"><span class="annottext">RnM a -&gt; (a -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128420"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span id="local-6989586621681128858"><span class="annot"><a href="GHC.Rename.Pat.html#liftCpsFV"><span class="hs-identifier hs-type">liftCpsFV</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681128858"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128858"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-131"></span><span id="liftCpsFV"><span class="annot"><span class="annottext">liftCpsFV :: forall a. RnM (a, FreeVars) -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCpsFV"><span class="hs-identifier hs-var hs-var">liftCpsFV</span></a></span></span><span> </span><span id="local-6989586621681128418"><span class="annot"><span class="annottext">RnM (a, FreeVars)
</span><a href="#local-6989586621681128418"><span class="hs-identifier hs-var">rn_thing</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall r. (a -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn a
forall b.
(forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn b
</span><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-var">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681128414"><span class="annot"><span class="annottext">a -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128414"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681128413"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681128413"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681128412"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681128412"><span class="hs-identifier hs-var">fvs1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnM (a, FreeVars)
</span><a href="#local-6989586621681128418"><span class="hs-identifier hs-var">rn_thing</span></a></span><span>
</span><span id="line-132"></span><span>                                     </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681128411"><span class="annot"><span class="annottext">r
</span><a href="#local-6989586621681128411"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681128410"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681128410"><span class="hs-identifier hs-var">fvs2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">a -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128414"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681128413"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-133"></span><span>                                     </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(r, FreeVars) -&gt; RnM (r, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">r
</span><a href="#local-6989586621681128411"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681128412"><span class="hs-identifier hs-var">fvs1</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; FreeVars -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#plusFV"><span class="hs-operator hs-var">`plusFV`</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681128410"><span class="hs-identifier hs-var">fvs2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span id="local-6989586621681128854"><span id="local-6989586621681128855"><span class="annot"><a href="GHC.Rename.Pat.html#wrapSrcSpanCps"><span class="hs-identifier hs-type">wrapSrcSpanCps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681128855"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128854"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128855"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128854"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-136"></span><span class="hs-comment">-- Set the location, and also wrap it around the value returned</span><span>
</span><span id="line-137"></span><span id="wrapSrcSpanCps"><span class="annot"><span class="annottext">wrapSrcSpanCps :: forall a b. (a -&gt; CpsRn b) -&gt; Located a -&gt; CpsRn (Located b)
</span><a href="GHC.Rename.Pat.html#wrapSrcSpanCps"><span class="hs-identifier hs-var hs-var">wrapSrcSpanCps</span></a></span></span><span> </span><span id="local-6989586621681128407"><span class="annot"><span class="annottext">a -&gt; CpsRn b
</span><a href="#local-6989586621681128407"><span class="hs-identifier hs-var">fn</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681128405"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128405"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681128404"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681128404"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-138"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall r. (Located b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn (Located b)
forall b.
(forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn b
</span><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-var">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681128403"><span class="annot"><span class="annottext">Located b -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128403"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; RnM (r, FreeVars) -&gt; RnM (r, FreeVars)
forall a. SrcSpan -&gt; TcRn a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#setSrcSpan"><span class="hs-identifier hs-var">setSrcSpan</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128405"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">(RnM (r, FreeVars) -&gt; RnM (r, FreeVars))
-&gt; RnM (r, FreeVars) -&gt; RnM (r, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-139"></span><span>                 </span><span class="annot"><span class="annottext">CpsRn b -&gt; forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars)
forall b.
CpsRn b -&gt; forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars)
</span><a href="GHC.Rename.Pat.html#unCpsRn"><span class="hs-identifier hs-var hs-var">unCpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; CpsRn b
</span><a href="#local-6989586621681128407"><span class="hs-identifier hs-var">fn</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681128404"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">((b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681128401"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621681128401"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-140"></span><span>                 </span><span class="annot"><span class="annottext">Located b -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128403"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; b -&gt; Located b
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128405"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621681128401"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-141"></span><span>
</span><span id="line-142"></span><span class="annot"><a href="GHC.Rename.Pat.html#lookupConCps"><span class="hs-identifier hs-type">lookupConCps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span id="lookupConCps"><span class="annot"><span class="annottext">lookupConCps :: Located RdrName -&gt; CpsRn (Located Name)
</span><a href="GHC.Rename.Pat.html#lookupConCps"><span class="hs-identifier hs-var hs-var">lookupConCps</span></a></span></span><span> </span><span id="local-6989586621681128399"><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681128399"><span class="hs-identifier hs-var">con_rdr</span></a></span></span><span>
</span><span id="line-144"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall r.
 (Located Name -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn (Located Name)
forall b.
(forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn b
</span><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-var">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681128395"><span class="annot"><span class="annottext">Located Name -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128395"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128394"><span class="annot"><span class="annottext">Located Name
</span><a href="#local-6989586621681128394"><span class="hs-identifier hs-var">con_name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Located RdrName -&gt; RnM (Located Name)
</span><a href="GHC.Rename.Env.html#lookupLocatedOccRn"><span class="hs-identifier hs-var">lookupLocatedOccRn</span></a></span><span> </span><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681128399"><span class="hs-identifier hs-var">con_rdr</span></a></span><span>
</span><span id="line-145"></span><span>                    </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681128392"><span class="annot"><span class="annottext">r
</span><a href="#local-6989586621681128392"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681128391"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681128391"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Located Name -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128395"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Located Name
</span><a href="#local-6989586621681128394"><span class="hs-identifier hs-var">con_name</span></a></span><span>
</span><span id="line-146"></span><span>                    </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(r, FreeVars) -&gt; RnM (r, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">r
</span><a href="#local-6989586621681128392"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; Name -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#addOneFV"><span class="hs-identifier hs-var">addOneFV</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681128391"><span class="hs-identifier hs-var">fvs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located Name -&gt; Name
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Located Name
</span><a href="#local-6989586621681128394"><span class="hs-identifier hs-var">con_name</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-147"></span><span>    </span><span class="hs-comment">-- We add the constructor name to the free vars</span><span>
</span><span id="line-148"></span><span>    </span><span class="hs-comment">-- See Note [Patterns are uses]</span><span>
</span><span id="line-149"></span><span>
</span><span id="line-150"></span><span class="hs-comment">{-
Note [Patterns are uses]
~~~~~~~~~~~~~~~~~~~~~~~~
Consider
  module Foo( f, g ) where
  data T = T1 | T2

  f T1 = True
  f T2 = False

  g _ = T1

Arguably we should report T2 as unused, even though it appears in a
pattern, because it never occurs in a constructed position.  See
#7336.
However, implementing this in the face of pattern synonyms would be
less straightforward, since given two pattern synonyms

  pattern P1 &lt;- P2
  pattern P2 &lt;- ()

we need to observe the dependency between P1 and P2 so that type
checking can be done in the correct order (just like for value
bindings). Dependencies between bindings is analyzed in the renamer,
where we don't know yet whether P2 is a constructor or a pattern
synonym. So for now, we do report conid occurrences in patterns as
uses.

*********************************************************
*                                                      *
        Name makers
*                                                      *
*********************************************************

Externally abstract type of name makers,
which is how you go from a RdrName to a Name
-}</span><span>
</span><span id="line-187"></span><span>
</span><span id="line-188"></span><span class="hs-keyword">data</span><span> </span><span id="NameMaker"><span class="annot"><a href="GHC.Rename.Pat.html#NameMaker"><span class="hs-identifier hs-var">NameMaker</span></a></span></span><span>
</span><span id="line-189"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="LamMk"><span class="annot"><a href="GHC.Rename.Pat.html#LamMk"><span class="hs-identifier hs-var">LamMk</span></a></span></span><span>       </span><span class="hs-comment">-- Lambdas</span><span>
</span><span id="line-190"></span><span>      </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>      </span><span class="hs-comment">-- True &lt;=&gt; report unused bindings</span><span>
</span><span id="line-191"></span><span>                </span><span class="hs-comment">--   (even if True, the warning only comes out</span><span>
</span><span id="line-192"></span><span>                </span><span class="hs-comment">--    if -Wunused-matches is on)</span><span>
</span><span id="line-193"></span><span>
</span><span id="line-194"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="LetMk"><span class="annot"><a href="GHC.Rename.Pat.html#LetMk"><span class="hs-identifier hs-var">LetMk</span></a></span></span><span>       </span><span class="hs-comment">-- Let bindings, incl top level</span><span>
</span><span id="line-195"></span><span>                </span><span class="hs-comment">-- Do *not* check for unused bindings</span><span>
</span><span id="line-196"></span><span>      </span><span class="annot"><a href="GHC.Types.Basic.html#TopLevelFlag"><span class="hs-identifier hs-type">TopLevelFlag</span></a></span><span>
</span><span id="line-197"></span><span>      </span><span class="annot"><a href="GHC.Rename.Fixity.html#MiniFixityEnv"><span class="hs-identifier hs-type">MiniFixityEnv</span></a></span><span>
</span><span id="line-198"></span><span>
</span><span id="line-199"></span><span class="annot"><a href="GHC.Rename.Pat.html#topRecNameMaker"><span class="hs-identifier hs-type">topRecNameMaker</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Fixity.html#MiniFixityEnv"><span class="hs-identifier hs-type">MiniFixityEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#NameMaker"><span class="hs-identifier hs-type">NameMaker</span></a></span><span>
</span><span id="line-200"></span><span id="topRecNameMaker"><span class="annot"><span class="annottext">topRecNameMaker :: MiniFixityEnv -&gt; NameMaker
</span><a href="GHC.Rename.Pat.html#topRecNameMaker"><span class="hs-identifier hs-var hs-var">topRecNameMaker</span></a></span></span><span> </span><span id="local-6989586621681128386"><span class="annot"><span class="annottext">MiniFixityEnv
</span><a href="#local-6989586621681128386"><span class="hs-identifier hs-var">fix_env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TopLevelFlag -&gt; MiniFixityEnv -&gt; NameMaker
</span><a href="GHC.Rename.Pat.html#LetMk"><span class="hs-identifier hs-var">LetMk</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="GHC.Types.Basic.html#TopLevel"><span class="hs-identifier hs-var">TopLevel</span></a></span><span> </span><span class="annot"><span class="annottext">MiniFixityEnv
</span><a href="#local-6989586621681128386"><span class="hs-identifier hs-var">fix_env</span></a></span><span>
</span><span id="line-201"></span><span>
</span><span id="line-202"></span><span class="annot"><a href="GHC.Rename.Pat.html#isTopRecNameMaker"><span class="hs-identifier hs-type">isTopRecNameMaker</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#NameMaker"><span class="hs-identifier hs-type">NameMaker</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-203"></span><span id="isTopRecNameMaker"><span class="annot"><span class="annottext">isTopRecNameMaker :: NameMaker -&gt; Bool
</span><a href="GHC.Rename.Pat.html#isTopRecNameMaker"><span class="hs-identifier hs-var hs-var">isTopRecNameMaker</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.Pat.html#LetMk"><span class="hs-identifier hs-type">LetMk</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="GHC.Types.Basic.html#TopLevel"><span class="hs-identifier hs-var">TopLevel</span></a></span><span> </span><span class="annot"><span class="annottext">MiniFixityEnv
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-204"></span><span class="annot"><a href="GHC.Rename.Pat.html#isTopRecNameMaker"><span class="hs-identifier hs-var">isTopRecNameMaker</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-205"></span><span>
</span><span id="line-206"></span><span class="annot"><a href="GHC.Rename.Pat.html#localRecNameMaker"><span class="hs-identifier hs-type">localRecNameMaker</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Fixity.html#MiniFixityEnv"><span class="hs-identifier hs-type">MiniFixityEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#NameMaker"><span class="hs-identifier hs-type">NameMaker</span></a></span><span>
</span><span id="line-207"></span><span id="localRecNameMaker"><span class="annot"><span class="annottext">localRecNameMaker :: MiniFixityEnv -&gt; NameMaker
</span><a href="GHC.Rename.Pat.html#localRecNameMaker"><span class="hs-identifier hs-var hs-var">localRecNameMaker</span></a></span></span><span> </span><span id="local-6989586621681128384"><span class="annot"><span class="annottext">MiniFixityEnv
</span><a href="#local-6989586621681128384"><span class="hs-identifier hs-var">fix_env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TopLevelFlag -&gt; MiniFixityEnv -&gt; NameMaker
</span><a href="GHC.Rename.Pat.html#LetMk"><span class="hs-identifier hs-var">LetMk</span></a></span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="GHC.Types.Basic.html#NotTopLevel"><span class="hs-identifier hs-var">NotTopLevel</span></a></span><span> </span><span class="annot"><span class="annottext">MiniFixityEnv
</span><a href="#local-6989586621681128384"><span class="hs-identifier hs-var">fix_env</span></a></span><span>
</span><span id="line-208"></span><span>
</span><span id="line-209"></span><span id="local-6989586621681128837"><span class="annot"><a href="GHC.Rename.Pat.html#matchNameMaker"><span class="hs-identifier hs-type">matchNameMaker</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#HsMatchContext"><span class="hs-identifier hs-type">HsMatchContext</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128837"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#NameMaker"><span class="hs-identifier hs-type">NameMaker</span></a></span></span><span>
</span><span id="line-210"></span><span id="matchNameMaker"><span class="annot"><span class="annottext">matchNameMaker :: forall a. HsMatchContext a -&gt; NameMaker
</span><a href="GHC.Rename.Pat.html#matchNameMaker"><span class="hs-identifier hs-var hs-var">matchNameMaker</span></a></span></span><span> </span><span id="local-6989586621681128381"><span class="annot"><span class="annottext">HsMatchContext a
</span><a href="#local-6989586621681128381"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; NameMaker
</span><a href="GHC.Rename.Pat.html#LamMk"><span class="hs-identifier hs-var">LamMk</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128380"><span class="hs-identifier hs-var">report_unused</span></a></span><span>
</span><span id="line-211"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-212"></span><span>    </span><span class="hs-comment">-- Do not report unused names in interactive contexts</span><span>
</span><span id="line-213"></span><span>    </span><span class="hs-comment">-- i.e. when you type 'x &lt;- e' at the GHCi prompt</span><span>
</span><span id="line-214"></span><span>    </span><span id="local-6989586621681128380"><span class="annot"><span class="annottext">report_unused :: Bool
</span><a href="#local-6989586621681128380"><span class="hs-identifier hs-var hs-var">report_unused</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HsMatchContext a
</span><a href="#local-6989586621681128381"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-215"></span><span>                      </span><span class="annot"><a href="GHC.Hs.Expr.html#StmtCtxt"><span class="hs-identifier hs-type">StmtCtxt</span></a></span><span> </span><span class="annot"><span class="annottext">HsStmtContext a
</span><a href="GHC.Hs.Expr.html#GhciStmtCtxt"><span class="hs-identifier hs-var">GhciStmtCtxt</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-216"></span><span>                      </span><span class="hs-comment">-- also, don't warn in pattern quotes, as there</span><span>
</span><span id="line-217"></span><span>                      </span><span class="hs-comment">-- is no RHS where the variables can be used!</span><span>
</span><span id="line-218"></span><span>                      </span><span class="annot"><span class="annottext">HsMatchContext a
</span><a href="GHC.Hs.Expr.html#ThPatQuote"><span class="hs-identifier hs-var">ThPatQuote</span></a></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-219"></span><span>                      </span><span class="annot"><span class="annottext">HsMatchContext a
</span><span class="hs-identifier">_</span></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-220"></span><span>
</span><span id="line-221"></span><span class="annot"><a href="GHC.Rename.Pat.html#newPatLName"><span class="hs-identifier hs-type">newPatLName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#NameMaker"><span class="hs-identifier hs-type">NameMaker</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-222"></span><span id="newPatLName"><span class="annot"><span class="annottext">newPatLName :: NameMaker -&gt; Located RdrName -&gt; CpsRn (Located Name)
</span><a href="GHC.Rename.Pat.html#newPatLName"><span class="hs-identifier hs-var hs-var">newPatLName</span></a></span></span><span> </span><span id="local-6989586621681128375"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128375"><span class="hs-identifier hs-var">name_maker</span></a></span></span><span> </span><span id="local-6989586621681128374"><span class="annot"><span class="annottext">rdr_name :: Located RdrName
</span><a href="#local-6989586621681128374"><span class="hs-identifier hs-var">rdr_name</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681128373"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128373"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-223"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128372"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128372"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; Located RdrName -&gt; CpsRn Name
</span><a href="GHC.Rename.Pat.html#newPatName"><span class="hs-identifier hs-var">newPatName</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128375"><span class="hs-identifier hs-var">name_maker</span></a></span><span> </span><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681128374"><span class="hs-identifier hs-var">rdr_name</span></a></span><span>
</span><span id="line-224"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Located Name -&gt; CpsRn (Located Name)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; Name -&gt; Located Name
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128373"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128372"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-225"></span><span>
</span><span id="line-226"></span><span class="annot"><a href="GHC.Rename.Pat.html#newPatName"><span class="hs-identifier hs-type">newPatName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#NameMaker"><span class="hs-identifier hs-type">NameMaker</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-227"></span><span id="newPatName"><span class="annot"><span class="annottext">newPatName :: NameMaker -&gt; Located RdrName -&gt; CpsRn Name
</span><a href="GHC.Rename.Pat.html#newPatName"><span class="hs-identifier hs-var hs-var">newPatName</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.Pat.html#LamMk"><span class="hs-identifier hs-type">LamMk</span></a></span><span> </span><span id="local-6989586621681128370"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128370"><span class="hs-identifier hs-var">report_unused</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681128369"><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681128369"><span class="hs-identifier hs-var">rdr_name</span></a></span></span><span>
</span><span id="line-228"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall r. (Name -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn Name
forall b.
(forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn b
</span><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-var">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681128363"><span class="annot"><span class="annottext">Name -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128363"><span class="hs-identifier hs-var">thing_inside</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-229"></span><span>        </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128362"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128362"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Located RdrName -&gt; RnM Name
</span><a href="GHC.Rename.Utils.html#newLocalBndrRn"><span class="hs-identifier hs-var">newLocalBndrRn</span></a></span><span> </span><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681128369"><span class="hs-identifier hs-var">rdr_name</span></a></span><span>
</span><span id="line-230"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681128361"><span class="annot"><span class="annottext">r
</span><a href="#local-6989586621681128361"><span class="hs-identifier hs-var">res</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681128360"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681128360"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; RnM (r, FreeVars) -&gt; RnM (r, FreeVars)
forall a. [Name] -&gt; RnM a -&gt; RnM a
</span><a href="GHC.Rename.Utils.html#bindLocalNames"><span class="hs-identifier hs-var">bindLocalNames</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128362"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128363"><span class="hs-identifier hs-var">thing_inside</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128362"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-231"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128370"><span class="hs-identifier hs-var">report_unused</span></a></span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env TcGblEnv TcLclEnv) ()
 -&gt; IOEnv (Env TcGblEnv TcLclEnv) ())
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; FreeVars -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Rename.Utils.html#warnUnusedMatches"><span class="hs-identifier hs-var">warnUnusedMatches</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128362"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681128360"><span class="hs-identifier hs-var">fvs</span></a></span><span>
</span><span id="line-232"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(r, FreeVars) -&gt; RnM (r, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">r
</span><a href="#local-6989586621681128361"><span class="hs-identifier hs-var">res</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128362"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; FreeVars -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#delFV"><span class="hs-operator hs-var">`delFV`</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681128360"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span class="annot"><a href="GHC.Rename.Pat.html#newPatName"><span class="hs-identifier hs-var">newPatName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.Pat.html#LetMk"><span class="hs-identifier hs-type">LetMk</span></a></span><span> </span><span id="local-6989586621681128358"><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="#local-6989586621681128358"><span class="hs-identifier hs-var">is_top</span></a></span></span><span> </span><span id="local-6989586621681128357"><span class="annot"><span class="annottext">MiniFixityEnv
</span><a href="#local-6989586621681128357"><span class="hs-identifier hs-var">fix_env</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681128356"><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681128356"><span class="hs-identifier hs-var">rdr_name</span></a></span></span><span>
</span><span id="line-235"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall r. (Name -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn Name
forall b.
(forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn b
</span><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-var">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681128354"><span class="annot"><span class="annottext">Name -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128354"><span class="hs-identifier hs-var">thing_inside</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-236"></span><span>        </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128353"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128353"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="#local-6989586621681128358"><span class="hs-identifier hs-var">is_top</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-237"></span><span>                       </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="GHC.Types.Basic.html#NotTopLevel"><span class="hs-identifier hs-var">NotTopLevel</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Located RdrName -&gt; RnM Name
</span><a href="GHC.Rename.Utils.html#newLocalBndrRn"><span class="hs-identifier hs-var">newLocalBndrRn</span></a></span><span> </span><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681128356"><span class="hs-identifier hs-var">rdr_name</span></a></span><span>
</span><span id="line-238"></span><span>                       </span><span class="annot"><span class="annottext">TopLevelFlag
</span><a href="GHC.Types.Basic.html#TopLevel"><span class="hs-identifier hs-var">TopLevel</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Located RdrName -&gt; RnM Name
</span><a href="GHC.Rename.Env.html#newTopSrcBinder"><span class="hs-identifier hs-var">newTopSrcBinder</span></a></span><span> </span><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681128356"><span class="hs-identifier hs-var">rdr_name</span></a></span><span>
</span><span id="line-239"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; RnM (r, FreeVars) -&gt; RnM (r, FreeVars)
forall a. [Name] -&gt; RnM a -&gt; RnM a
</span><a href="GHC.Rename.Utils.html#bindLocalNames"><span class="hs-identifier hs-var">bindLocalNames</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128353"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">(RnM (r, FreeVars) -&gt; RnM (r, FreeVars))
-&gt; RnM (r, FreeVars) -&gt; RnM (r, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>       </span><span class="hs-comment">-- Do *not* use bindLocalNameFV here</span><span>
</span><span id="line-240"></span><span>                                        </span><span class="hs-comment">-- See Note [View pattern usage]</span><span>
</span><span id="line-241"></span><span>             </span><span class="annot"><span class="annottext">MiniFixityEnv -&gt; [Name] -&gt; RnM (r, FreeVars) -&gt; RnM (r, FreeVars)
forall a. MiniFixityEnv -&gt; [Name] -&gt; RnM a -&gt; RnM a
</span><a href="GHC.Rename.Fixity.html#addLocalFixities"><span class="hs-identifier hs-var">addLocalFixities</span></a></span><span> </span><span class="annot"><span class="annottext">MiniFixityEnv
</span><a href="#local-6989586621681128357"><span class="hs-identifier hs-var">fix_env</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128353"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">(RnM (r, FreeVars) -&gt; RnM (r, FreeVars))
-&gt; RnM (r, FreeVars) -&gt; RnM (r, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-242"></span><span>             </span><span class="annot"><span class="annottext">Name -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128354"><span class="hs-identifier hs-var">thing_inside</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128353"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-243"></span><span>
</span><span id="line-244"></span><span>    </span><span class="hs-comment">-- Note: the bindLocalNames is somewhat suspicious</span><span>
</span><span id="line-245"></span><span>    </span><span class="hs-comment">--       because it binds a top-level name as a local name.</span><span>
</span><span id="line-246"></span><span>    </span><span class="hs-comment">--       however, this binding seems to work, and it only exists for</span><span>
</span><span id="line-247"></span><span>    </span><span class="hs-comment">--       the duration of the patterns and the continuation;</span><span>
</span><span id="line-248"></span><span>    </span><span class="hs-comment">--       then the top-level name is added to the global env</span><span>
</span><span id="line-249"></span><span>    </span><span class="hs-comment">--       before going on to the RHSes (see GHC.Rename.Module).</span><span>
</span><span id="line-250"></span><span>
</span><span id="line-251"></span><span class="hs-comment">{-
Note [View pattern usage]
~~~~~~~~~~~~~~~~~~~~~~~~~
Consider
  let (r, (r -&gt; x)) = x in ...
Here the pattern binds 'r', and then uses it *only* in the view pattern.
We want to &quot;see&quot; this use, and in let-bindings we collect all uses and
report unused variables at the binding level. So we must use bindLocalNames
here, *not* bindLocalNameFV.  #3943.


Note [Don't report shadowing for pattern synonyms]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There is one special context where a pattern doesn't introduce any new binders -
pattern synonym declarations. Therefore we don't check to see if pattern
variables shadow existing identifiers as they are never bound to anything
and have no scope.

Without this check, there would be quite a cryptic warning that the `x`
in the RHS of the pattern synonym declaration shadowed the top level `x`.

```
x :: ()
x = ()

pattern P x = Just x
```

See #12615 for some more examples.

*********************************************************
*                                                      *
        External entry points
*                                                      *
*********************************************************

There are various entry points to renaming patterns, depending on
 (1) whether the names created should be top-level names or local names
 (2) whether the scope of the names is entirely given in a continuation
     (e.g., in a case or lambda, but not in a let or at the top-level,
      because of the way mutually recursive bindings are handled)
 (3) whether the a type signature in the pattern can bind
        lexically-scoped type variables (for unpacking existential
        type vars in data constructors)
 (4) whether we do duplicate and unused variable checking
 (5) whether there are fixity declarations associated with the names
     bound by the patterns that need to be brought into scope with them.

 Rather than burdening the clients of this module with all of these choices,
 we export the three points in this design space that we actually need:
-}</span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span class="hs-comment">-- ----------- Entry point 1: rnPats -------------------</span><span>
</span><span id="line-304"></span><span class="hs-comment">-- Binds local names; the scope of the bindings is entirely in the thing_inside</span><span>
</span><span id="line-305"></span><span class="hs-comment">--   * allows type sigs to bind type vars</span><span>
</span><span id="line-306"></span><span class="hs-comment">--   * local namemaker</span><span>
</span><span id="line-307"></span><span class="hs-comment">--   * unused and duplicate checking</span><span>
</span><span id="line-308"></span><span class="hs-comment">--   * no fixities</span><span>
</span><span id="line-309"></span><span id="local-6989586621681128827"><span class="annot"><a href="GHC.Rename.Pat.html#rnPats"><span class="hs-identifier hs-type">rnPats</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#HsMatchContext"><span class="hs-identifier hs-type">HsMatchContext</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-comment">-- for error messages</span><span>
</span><span id="line-310"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-311"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681128827"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-312"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681128827"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-313"></span><span id="rnPats"><span class="annot"><span class="annottext">rnPats :: forall a.
HsMatchContext (GhcPass 'Renamed)
-&gt; [LPat GhcPs]
-&gt; ([LPat (GhcPass 'Renamed)] -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.Pat.html#rnPats"><span class="hs-identifier hs-var hs-var">rnPats</span></a></span></span><span> </span><span id="local-6989586621681128345"><span class="annot"><span class="annottext">HsMatchContext (GhcPass 'Renamed)
</span><a href="#local-6989586621681128345"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span id="local-6989586621681128344"><span class="annot"><span class="annottext">[LPat GhcPs]
</span><a href="#local-6989586621681128344"><span class="hs-identifier hs-var">pats</span></a></span></span><span> </span><span id="local-6989586621681128343"><span class="annot"><span class="annottext">[LPat (GhcPass 'Renamed)] -&gt; RnM (a, FreeVars)
</span><a href="#local-6989586621681128343"><span class="hs-identifier hs-var">thing_inside</span></a></span></span><span>
</span><span id="line-314"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128342"><span class="annot"><span class="annottext">(GlobalRdrEnv, LocalRdrEnv)
</span><a href="#local-6989586621681128342"><span class="hs-identifier hs-var">envs_before</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TcRn (GlobalRdrEnv, LocalRdrEnv)
</span><a href="GHC.Tc.Utils.Monad.html#getRdrEnvs"><span class="hs-identifier hs-var">getRdrEnvs</span></a></span><span>
</span><span id="line-315"></span><span>
</span><span id="line-316"></span><span>          </span><span class="hs-comment">-- (1) rename the patterns, bringing into scope all of the term variables</span><span>
</span><span id="line-317"></span><span>          </span><span class="hs-comment">-- (2) then do the thing inside.</span><span>
</span><span id="line-318"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CpsRn [Located (Pat (GhcPass 'Renamed))]
-&gt; forall r.
   ([Located (Pat (GhcPass 'Renamed))] -&gt; RnM (r, FreeVars))
   -&gt; RnM (r, FreeVars)
forall b.
CpsRn b -&gt; forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars)
</span><a href="GHC.Rename.Pat.html#unCpsRn"><span class="hs-identifier hs-var hs-var">unCpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NameMaker -&gt; [LPat GhcPs] -&gt; CpsRn [LPat (GhcPass 'Renamed)]
</span><a href="GHC.Rename.Pat.html#rnLPatsAndThen"><span class="hs-identifier hs-var">rnLPatsAndThen</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsMatchContext (GhcPass 'Renamed) -&gt; NameMaker
forall a. HsMatchContext a -&gt; NameMaker
</span><a href="GHC.Rename.Pat.html#matchNameMaker"><span class="hs-identifier hs-var">matchNameMaker</span></a></span><span> </span><span class="annot"><span class="annottext">HsMatchContext (GhcPass 'Renamed)
</span><a href="#local-6989586621681128345"><span class="hs-identifier hs-var">ctxt</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LPat GhcPs]
</span><a href="#local-6989586621681128344"><span class="hs-identifier hs-var">pats</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(([Located (Pat (GhcPass 'Renamed))] -&gt; RnM (a, FreeVars))
 -&gt; RnM (a, FreeVars))
-&gt; ([Located (Pat (GhcPass 'Renamed))] -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681128339"><span class="annot"><span class="annottext">[Located (Pat (GhcPass 'Renamed))]
</span><a href="#local-6989586621681128339"><span class="hs-identifier hs-var">pats'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-319"></span><span>        </span><span class="hs-special">{</span><span> </span><span class="hs-comment">-- Check for duplicated and shadowed names</span><span>
</span><span id="line-320"></span><span>          </span><span class="hs-comment">-- Must do this *after* renaming the patterns</span><span>
</span><span id="line-321"></span><span>          </span><span class="hs-comment">-- See Note [Collect binders only after renaming] in GHC.Hs.Utils</span><span>
</span><span id="line-322"></span><span>          </span><span class="hs-comment">-- Because we don't bind the vars all at once, we can't</span><span>
</span><span id="line-323"></span><span>          </span><span class="hs-comment">--    check incrementally for duplicates;</span><span>
</span><span id="line-324"></span><span>          </span><span class="hs-comment">-- Nor can we check incrementally for shadowing, else we'll</span><span>
</span><span id="line-325"></span><span>          </span><span class="hs-comment">--    complain *twice* about duplicates e.g. f (x,x) = ...</span><span>
</span><span id="line-326"></span><span>          </span><span class="hs-comment">--</span><span>
</span><span id="line-327"></span><span>          </span><span class="hs-comment">-- See note [Don't report shadowing for pattern synonyms]</span><span>
</span><span id="line-328"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681128338"><span class="annot"><span class="annottext">bndrs :: [IdP (GhcPass 'Renamed)]
</span><a href="#local-6989586621681128338"><span class="hs-identifier hs-var hs-var">bndrs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LPat (GhcPass 'Renamed)] -&gt; [IdP (GhcPass 'Renamed)]
forall p. CollectPass p =&gt; [LPat p] -&gt; [IdP p]
</span><a href="GHC.Hs.Utils.html#collectPatsBinders"><span class="hs-identifier hs-var">collectPatsBinders</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (Pat (GhcPass 'Renamed))]
[LPat (GhcPass 'Renamed)]
</span><a href="#local-6989586621681128339"><span class="hs-identifier hs-var">pats'</span></a></span><span>
</span><span id="line-329"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">MsgDoc
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall a. MsgDoc -&gt; TcM a -&gt; TcM a
</span><a href="GHC.Tc.Utils.Monad.html#addErrCtxt"><span class="hs-identifier hs-var">addErrCtxt</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681128335"><span class="hs-identifier hs-var">doc_pat</span></a></span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env TcGblEnv TcLclEnv) ()
 -&gt; IOEnv (Env TcGblEnv TcLclEnv) ())
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-330"></span><span>          </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">HsMatchContext (GhcPass 'Renamed) -&gt; Bool
forall p. HsMatchContext p -&gt; Bool
</span><a href="GHC.Hs.Expr.html#isPatSynCtxt"><span class="hs-identifier hs-var">isPatSynCtxt</span></a></span><span> </span><span class="annot"><span class="annottext">HsMatchContext (GhcPass 'Renamed)
</span><a href="#local-6989586621681128345"><span class="hs-identifier hs-var">ctxt</span></a></span><span>
</span><span id="line-331"></span><span>             </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Rename.Utils.html#checkDupNames"><span class="hs-identifier hs-var">checkDupNames</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
[IdP (GhcPass 'Renamed)]
</span><a href="#local-6989586621681128338"><span class="hs-identifier hs-var">bndrs</span></a></span><span>
</span><span id="line-332"></span><span>             </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">(GlobalRdrEnv, LocalRdrEnv)
-&gt; [Name] -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Rename.Utils.html#checkDupAndShadowedNames"><span class="hs-identifier hs-var">checkDupAndShadowedNames</span></a></span><span> </span><span class="annot"><span class="annottext">(GlobalRdrEnv, LocalRdrEnv)
</span><a href="#local-6989586621681128342"><span class="hs-identifier hs-var">envs_before</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
[IdP (GhcPass 'Renamed)]
</span><a href="#local-6989586621681128338"><span class="hs-identifier hs-var">bndrs</span></a></span><span>
</span><span id="line-333"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">[LPat (GhcPass 'Renamed)] -&gt; RnM (a, FreeVars)
</span><a href="#local-6989586621681128343"><span class="hs-identifier hs-var">thing_inside</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (Pat (GhcPass 'Renamed))]
[LPat (GhcPass 'Renamed)]
</span><a href="#local-6989586621681128339"><span class="hs-identifier hs-var">pats'</span></a></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-334"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-335"></span><span>    </span><span id="local-6989586621681128335"><span class="annot"><span class="annottext">doc_pat :: MsgDoc
</span><a href="#local-6989586621681128335"><span class="hs-identifier hs-var hs-var">doc_pat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;In&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HsMatchContext (GhcPass 'Renamed) -&gt; MsgDoc
forall p. Outputable (IdP p) =&gt; HsMatchContext p -&gt; MsgDoc
</span><a href="GHC.Hs.Expr.html#pprMatchContext"><span class="hs-identifier hs-var">pprMatchContext</span></a></span><span> </span><span class="annot"><span class="annottext">HsMatchContext (GhcPass 'Renamed)
</span><a href="#local-6989586621681128345"><span class="hs-identifier hs-var">ctxt</span></a></span><span>
</span><span id="line-336"></span><span>
</span><span id="line-337"></span><span id="local-6989586621681128816"><span class="annot"><a href="GHC.Rename.Pat.html#rnPat"><span class="hs-identifier hs-type">rnPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#HsMatchContext"><span class="hs-identifier hs-type">HsMatchContext</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-comment">-- for error messages</span><span>
</span><span id="line-338"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-339"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681128816"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-340"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681128816"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span></span><span>     </span><span class="hs-comment">-- Variables bound by pattern do not</span><span>
</span><span id="line-341"></span><span>                               </span><span class="hs-comment">-- appear in the result FreeVars</span><span>
</span><span id="line-342"></span><span id="rnPat"><span class="annot"><span class="annottext">rnPat :: forall a.
HsMatchContext (GhcPass 'Renamed)
-&gt; LPat GhcPs
-&gt; (LPat (GhcPass 'Renamed) -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.Pat.html#rnPat"><span class="hs-identifier hs-var hs-var">rnPat</span></a></span></span><span> </span><span id="local-6989586621681128330"><span class="annot"><span class="annottext">HsMatchContext (GhcPass 'Renamed)
</span><a href="#local-6989586621681128330"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span id="local-6989586621681128329"><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128329"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span id="local-6989586621681128328"><span class="annot"><span class="annottext">LPat (GhcPass 'Renamed) -&gt; RnM (a, FreeVars)
</span><a href="#local-6989586621681128328"><span class="hs-identifier hs-var">thing_inside</span></a></span></span><span>
</span><span id="line-343"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsMatchContext (GhcPass 'Renamed)
-&gt; [LPat GhcPs]
-&gt; ([LPat (GhcPass 'Renamed)] -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
forall a.
HsMatchContext (GhcPass 'Renamed)
-&gt; [LPat GhcPs]
-&gt; ([LPat (GhcPass 'Renamed)] -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.Pat.html#rnPats"><span class="hs-identifier hs-var">rnPats</span></a></span><span> </span><span class="annot"><span class="annottext">HsMatchContext (GhcPass 'Renamed)
</span><a href="#local-6989586621681128330"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128329"><span class="hs-identifier hs-var">pat</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681128327"><span class="annot"><span class="annottext">[LPat (GhcPass 'Renamed)]
</span><a href="#local-6989586621681128327"><span class="hs-identifier hs-var">pats'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">[</span><span id="local-6989586621681128326"><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128326"><span class="hs-identifier hs-var">pat'</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Located (Pat (GhcPass 'Renamed))]
[LPat (GhcPass 'Renamed)]
</span><a href="#local-6989586621681128327"><span class="hs-identifier hs-var">pats'</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">LPat (GhcPass 'Renamed) -&gt; RnM (a, FreeVars)
</span><a href="#local-6989586621681128328"><span class="hs-identifier hs-var">thing_inside</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
LPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128326"><span class="hs-identifier hs-var">pat'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-344"></span><span>
</span><span id="line-345"></span><span class="annot"><a href="GHC.Rename.Pat.html#applyNameMaker"><span class="hs-identifier hs-type">applyNameMaker</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#NameMaker"><span class="hs-identifier hs-type">NameMaker</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-346"></span><span id="applyNameMaker"><span class="annot"><span class="annottext">applyNameMaker :: NameMaker -&gt; Located RdrName -&gt; RnM (Located Name)
</span><a href="GHC.Rename.Pat.html#applyNameMaker"><span class="hs-identifier hs-var hs-var">applyNameMaker</span></a></span></span><span> </span><span id="local-6989586621681128325"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128325"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span id="local-6989586621681128324"><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681128324"><span class="hs-identifier hs-var">rdr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681128323"><span class="annot"><span class="annottext">Located Name
</span><a href="#local-6989586621681128323"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681128322"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681128322"><span class="hs-identifier hs-var">_fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CpsRn (Located Name) -&gt; RnM (Located Name, FreeVars)
forall a. CpsRn a -&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.Pat.html#runCps"><span class="hs-identifier hs-var">runCps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NameMaker -&gt; Located RdrName -&gt; CpsRn (Located Name)
</span><a href="GHC.Rename.Pat.html#newPatLName"><span class="hs-identifier hs-var">newPatLName</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128325"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681128324"><span class="hs-identifier hs-var">rdr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-347"></span><span>                           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Located Name -&gt; RnM (Located Name)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Located Name
</span><a href="#local-6989586621681128323"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-348"></span><span>
</span><span id="line-349"></span><span class="hs-comment">-- ----------- Entry point 2: rnBindPat -------------------</span><span>
</span><span id="line-350"></span><span class="hs-comment">-- Binds local names; in a recursive scope that involves other bound vars</span><span>
</span><span id="line-351"></span><span class="hs-comment">--      e.g let { (x, Just y) = e1; ... } in ...</span><span>
</span><span id="line-352"></span><span class="hs-comment">--   * does NOT allows type sig to bind type vars</span><span>
</span><span id="line-353"></span><span class="hs-comment">--   * local namemaker</span><span>
</span><span id="line-354"></span><span class="hs-comment">--   * no unused and duplicate checking</span><span>
</span><span id="line-355"></span><span class="hs-comment">--   * fixities might be coming in</span><span>
</span><span id="line-356"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnBindPat"><span class="hs-identifier hs-type">rnBindPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#NameMaker"><span class="hs-identifier hs-type">NameMaker</span></a></span><span>
</span><span id="line-357"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-358"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-359"></span><span>   </span><span class="hs-comment">-- Returned FreeVars are the free variables of the pattern,</span><span>
</span><span id="line-360"></span><span>   </span><span class="hs-comment">-- of course excluding variables bound by this pattern</span><span>
</span><span id="line-361"></span><span>
</span><span id="line-362"></span><span id="rnBindPat"><span class="annot"><span class="annottext">rnBindPat :: NameMaker -&gt; LPat GhcPs -&gt; RnM (LPat (GhcPass 'Renamed), FreeVars)
</span><a href="GHC.Rename.Pat.html#rnBindPat"><span class="hs-identifier hs-var hs-var">rnBindPat</span></a></span></span><span> </span><span id="local-6989586621681128321"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128321"><span class="hs-identifier hs-var">name_maker</span></a></span></span><span> </span><span id="local-6989586621681128320"><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128320"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CpsRn (Located (Pat (GhcPass 'Renamed)))
-&gt; RnM (Located (Pat (GhcPass 'Renamed)), FreeVars)
forall a. CpsRn a -&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.Pat.html#runCps"><span class="hs-identifier hs-var">runCps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NameMaker -&gt; LPat GhcPs -&gt; CpsRn (LPat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnLPatAndThen"><span class="hs-identifier hs-var">rnLPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128321"><span class="hs-identifier hs-var">name_maker</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128320"><span class="hs-identifier hs-var">pat</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-363"></span><span>
</span><span id="line-364"></span><span class="hs-comment">{-
*********************************************************
*                                                      *
        The main event
*                                                      *
*********************************************************
-}</span><span>
</span><span id="line-371"></span><span>
</span><span id="line-372"></span><span class="hs-comment">-- ----------- Entry point 3: rnLPatAndThen -------------------</span><span>
</span><span id="line-373"></span><span class="hs-comment">-- General version: parametrized by how you make new names</span><span>
</span><span id="line-374"></span><span>
</span><span id="line-375"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnLPatsAndThen"><span class="hs-identifier hs-type">rnLPatsAndThen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#NameMaker"><span class="hs-identifier hs-type">NameMaker</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-376"></span><span id="rnLPatsAndThen"><span class="annot"><span class="annottext">rnLPatsAndThen :: NameMaker -&gt; [LPat GhcPs] -&gt; CpsRn [LPat (GhcPass 'Renamed)]
</span><a href="GHC.Rename.Pat.html#rnLPatsAndThen"><span class="hs-identifier hs-var hs-var">rnLPatsAndThen</span></a></span></span><span> </span><span id="local-6989586621681128318"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128318"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Located (Pat GhcPs) -&gt; CpsRn (Located (Pat (GhcPass 'Renamed))))
-&gt; [Located (Pat GhcPs)]
-&gt; CpsRn [Located (Pat (GhcPass 'Renamed))]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NameMaker -&gt; LPat GhcPs -&gt; CpsRn (LPat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnLPatAndThen"><span class="hs-identifier hs-var">rnLPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128318"><span class="hs-identifier hs-var">mk</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-377"></span><span>  </span><span class="hs-comment">-- Despite the map, the monad ensures that each pattern binds</span><span>
</span><span id="line-378"></span><span>  </span><span class="hs-comment">-- variables that may be mentioned in subsequent patterns in the list</span><span>
</span><span id="line-379"></span><span>
</span><span id="line-380"></span><span class="hs-comment">--------------------</span><span>
</span><span id="line-381"></span><span class="hs-comment">-- The workhorse</span><span>
</span><span id="line-382"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnLPatAndThen"><span class="hs-identifier hs-type">rnLPatAndThen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#NameMaker"><span class="hs-identifier hs-type">NameMaker</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-383"></span><span id="rnLPatAndThen"><span class="annot"><span class="annottext">rnLPatAndThen :: NameMaker -&gt; LPat GhcPs -&gt; CpsRn (LPat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnLPatAndThen"><span class="hs-identifier hs-var hs-var">rnLPatAndThen</span></a></span></span><span> </span><span id="local-6989586621681128316"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128316"><span class="hs-identifier hs-var">nm</span></a></span></span><span> </span><span id="local-6989586621681128315"><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128315"><span class="hs-identifier hs-var">lpat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Pat GhcPs -&gt; CpsRn (Pat (GhcPass 'Renamed)))
-&gt; Located (Pat GhcPs) -&gt; CpsRn (Located (Pat (GhcPass 'Renamed)))
forall a b. (a -&gt; CpsRn b) -&gt; Located a -&gt; CpsRn (Located b)
</span><a href="GHC.Rename.Pat.html#wrapSrcSpanCps"><span class="hs-identifier hs-var">wrapSrcSpanCps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NameMaker -&gt; Pat GhcPs -&gt; CpsRn (Pat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128316"><span class="hs-identifier hs-var">nm</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Located (Pat GhcPs)
LPat GhcPs
</span><a href="#local-6989586621681128315"><span class="hs-identifier hs-var">lpat</span></a></span><span>
</span><span id="line-384"></span><span>
</span><span id="line-385"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-type">rnPatAndThen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#NameMaker"><span class="hs-identifier hs-type">NameMaker</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-386"></span><span id="rnPatAndThen"><span class="annot"><span class="annottext">rnPatAndThen :: NameMaker -&gt; Pat GhcPs -&gt; CpsRn (Pat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var hs-var">rnPatAndThen</span></a></span></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#WildPat"><span class="hs-identifier hs-type">WildPat</span></a></span><span> </span><span class="annot"><span class="annottext">XWildPat GhcPs
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XWildPat (GhcPass 'Renamed) -&gt; Pat (GhcPass 'Renamed)
forall p. XWildPat p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#WildPat"><span class="hs-identifier hs-var">WildPat</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XWildPat (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-387"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span id="local-6989586621681128312"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128312"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ParPat"><span class="hs-identifier hs-type">ParPat</span></a></span><span> </span><span id="local-6989586621681128310"><span class="annot"><span class="annottext">XParPat GhcPs
</span><a href="#local-6989586621681128310"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681128309"><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128309"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128308"><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128308"><span class="hs-identifier hs-var">pat'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; LPat GhcPs -&gt; CpsRn (LPat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnLPatAndThen"><span class="hs-identifier hs-var">rnLPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128312"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128309"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-388"></span><span>                                     </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XParPat (GhcPass 'Renamed)
-&gt; LPat (GhcPass 'Renamed) -&gt; Pat (GhcPass 'Renamed)
forall p. XParPat p -&gt; LPat p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#ParPat"><span class="hs-identifier hs-var">ParPat</span></a></span><span> </span><span class="annot"><span class="annottext">XParPat GhcPs
XParPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128310"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
LPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128308"><span class="hs-identifier hs-var">pat'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-389"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span id="local-6989586621681128307"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128307"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LazyPat"><span class="hs-identifier hs-type">LazyPat</span></a></span><span> </span><span id="local-6989586621681128305"><span class="annot"><span class="annottext">XLazyPat GhcPs
</span><a href="#local-6989586621681128305"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681128304"><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128304"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128303"><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128303"><span class="hs-identifier hs-var">pat'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; LPat GhcPs -&gt; CpsRn (LPat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnLPatAndThen"><span class="hs-identifier hs-var">rnLPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128307"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128304"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-390"></span><span>                                     </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XLazyPat (GhcPass 'Renamed)
-&gt; LPat (GhcPass 'Renamed) -&gt; Pat (GhcPass 'Renamed)
forall p. XLazyPat p -&gt; LPat p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#LazyPat"><span class="hs-identifier hs-var">LazyPat</span></a></span><span> </span><span class="annot"><span class="annottext">XLazyPat GhcPs
XLazyPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128305"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
LPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128303"><span class="hs-identifier hs-var">pat'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-391"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span id="local-6989586621681128302"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128302"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#BangPat"><span class="hs-identifier hs-type">BangPat</span></a></span><span> </span><span id="local-6989586621681128300"><span class="annot"><span class="annottext">XBangPat GhcPs
</span><a href="#local-6989586621681128300"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681128299"><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128299"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128298"><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128298"><span class="hs-identifier hs-var">pat'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; LPat GhcPs -&gt; CpsRn (LPat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnLPatAndThen"><span class="hs-identifier hs-var">rnLPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128302"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128299"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-392"></span><span>                                     </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XBangPat (GhcPass 'Renamed)
-&gt; LPat (GhcPass 'Renamed) -&gt; Pat (GhcPass 'Renamed)
forall p. XBangPat p -&gt; LPat p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#BangPat"><span class="hs-identifier hs-var">BangPat</span></a></span><span> </span><span class="annot"><span class="annottext">XBangPat GhcPs
XBangPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128300"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
LPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128298"><span class="hs-identifier hs-var">pat'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-393"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span id="local-6989586621681128297"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128297"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#VarPat"><span class="hs-identifier hs-type">VarPat</span></a></span><span> </span><span id="local-6989586621681128295"><span class="annot"><span class="annottext">XVarPat GhcPs
</span><a href="#local-6989586621681128295"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681128294"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128294"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621681128293"><span class="annot"><span class="annottext">IdP GhcPs
</span><a href="#local-6989586621681128293"><span class="hs-identifier hs-var">rdr</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-394"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128292"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128292"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnM SrcSpan -&gt; CpsRn SrcSpan
forall a. RnM a -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCps"><span class="hs-identifier hs-var">liftCps</span></a></span><span> </span><span class="annot"><span class="annottext">RnM SrcSpan
</span><a href="GHC.Tc.Utils.Monad.html#getSrcSpanM"><span class="hs-identifier hs-var">getSrcSpanM</span></a></span><span>
</span><span id="line-395"></span><span>         </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128290"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128290"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; Located RdrName -&gt; CpsRn Name
</span><a href="GHC.Rename.Pat.html#newPatName"><span class="hs-identifier hs-var">newPatName</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128297"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; RdrName -&gt; Located RdrName
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128292"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
IdP GhcPs
</span><a href="#local-6989586621681128293"><span class="hs-identifier hs-var">rdr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-396"></span><span>         </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XVarPat (GhcPass 'Renamed)
-&gt; Located (IdP (GhcPass 'Renamed)) -&gt; Pat (GhcPass 'Renamed)
forall p. XVarPat p -&gt; Located (IdP p) -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#VarPat"><span class="hs-identifier hs-var">VarPat</span></a></span><span> </span><span class="annot"><span class="annottext">XVarPat GhcPs
XVarPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128295"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; Name -&gt; Located Name
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128294"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128290"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-397"></span><span>     </span><span class="hs-comment">-- we need to bind pattern variables for view pattern expressions</span><span>
</span><span id="line-398"></span><span>     </span><span class="hs-comment">-- (e.g. in the pattern (x, x -&gt; y) x needs to be bound in the rhs of the tuple)</span><span>
</span><span id="line-399"></span><span>
</span><span id="line-400"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span id="local-6989586621681128289"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128289"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#SigPat"><span class="hs-identifier hs-type">SigPat</span></a></span><span> </span><span id="local-6989586621681128287"><span class="annot"><span class="annottext">XSigPat GhcPs
</span><a href="#local-6989586621681128287"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681128286"><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128286"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span id="local-6989586621681128285"><span class="annot"><span class="annottext">HsPatSigType (NoGhcTc GhcPs)
</span><a href="#local-6989586621681128285"><span class="hs-identifier hs-var">sig</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-401"></span><span>  </span><span class="hs-comment">-- When renaming a pattern type signature (e.g. f (a :: T) = ...), it is</span><span>
</span><span id="line-402"></span><span>  </span><span class="hs-comment">-- important to rename its type signature _before_ renaming the rest of the</span><span>
</span><span id="line-403"></span><span>  </span><span class="hs-comment">-- pattern, so that type variables are first bound by the _outermost_ pattern</span><span>
</span><span id="line-404"></span><span>  </span><span class="hs-comment">-- type signature they occur in. This keeps the type checker happy when</span><span>
</span><span id="line-405"></span><span>  </span><span class="hs-comment">-- pattern type signatures happen to be nested (#7827)</span><span>
</span><span id="line-406"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-407"></span><span>  </span><span class="hs-comment">-- f ((Just (x :: a) :: Maybe a)</span><span>
</span><span id="line-408"></span><span>  </span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~^       `a' is first bound here</span><span>
</span><span id="line-409"></span><span>  </span><span class="hs-comment">-- ~~~~~~~~~~~~~~~^                   the same `a' then used here</span><span>
</span><span id="line-410"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128284"><span class="annot"><span class="annottext">HsPatSigType (GhcPass 'Renamed)
</span><a href="#local-6989586621681128284"><span class="hs-identifier hs-var">sig'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsPatSigType GhcPs -&gt; CpsRn (HsPatSigType (GhcPass 'Renamed))
</span><a href="#local-6989586621681128283"><span class="hs-identifier hs-var">rnHsPatSigTypeAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">HsPatSigType GhcPs
HsPatSigType (NoGhcTc GhcPs)
</span><a href="#local-6989586621681128285"><span class="hs-identifier hs-var">sig</span></a></span><span>
</span><span id="line-411"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128282"><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128282"><span class="hs-identifier hs-var">pat'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; LPat GhcPs -&gt; CpsRn (LPat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnLPatAndThen"><span class="hs-identifier hs-var">rnLPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128289"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128286"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-412"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XSigPat (GhcPass 'Renamed)
-&gt; LPat (GhcPass 'Renamed)
-&gt; HsPatSigType (NoGhcTc (GhcPass 'Renamed))
-&gt; Pat (GhcPass 'Renamed)
forall p. XSigPat p -&gt; LPat p -&gt; HsPatSigType (NoGhcTc p) -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#SigPat"><span class="hs-identifier hs-var">SigPat</span></a></span><span> </span><span class="annot"><span class="annottext">XSigPat GhcPs
XSigPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128287"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
LPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128282"><span class="hs-identifier hs-var">pat'</span></a></span><span> </span><span class="annot"><span class="annottext">HsPatSigType (GhcPass 'Renamed)
HsPatSigType (NoGhcTc (GhcPass 'Renamed))
</span><a href="#local-6989586621681128284"><span class="hs-identifier hs-var">sig'</span></a></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-413"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-414"></span><span>    </span><span class="annot"><a href="#local-6989586621681128283"><span class="hs-identifier hs-type">rnHsPatSigTypeAndThen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsPatSigType"><span class="hs-identifier hs-type">HsPatSigType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsPatSigType"><span class="hs-identifier hs-type">HsPatSigType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-415"></span><span>    </span><span id="local-6989586621681128283"><span class="annot"><span class="annottext">rnHsPatSigTypeAndThen :: HsPatSigType GhcPs -&gt; CpsRn (HsPatSigType (GhcPass 'Renamed))
</span><a href="#local-6989586621681128283"><span class="hs-identifier hs-var hs-var">rnHsPatSigTypeAndThen</span></a></span></span><span> </span><span id="local-6989586621681128281"><span class="annot"><span class="annottext">HsPatSigType GhcPs
</span><a href="#local-6989586621681128281"><span class="hs-identifier hs-var">sig</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall r.
 (HsPatSigType (GhcPass 'Renamed) -&gt; RnM (r, FreeVars))
 -&gt; RnM (r, FreeVars))
-&gt; CpsRn (HsPatSigType (GhcPass 'Renamed))
forall b.
(forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn b
</span><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-var">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsSigWcTypeScoping
-&gt; HsDocContext
-&gt; HsPatSigType GhcPs
-&gt; (HsPatSigType (GhcPass 'Renamed) -&gt; RnM (r, FreeVars))
-&gt; RnM (r, FreeVars)
forall a.
HsSigWcTypeScoping
-&gt; HsDocContext
-&gt; HsPatSigType GhcPs
-&gt; (HsPatSigType (GhcPass 'Renamed) -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsPatSigType"><span class="hs-identifier hs-var">rnHsPatSigType</span></a></span><span> </span><span class="annot"><span class="annottext">HsSigWcTypeScoping
</span><a href="GHC.Rename.HsType.html#AlwaysBind"><span class="hs-identifier hs-var">AlwaysBind</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="GHC.Rename.Utils.html#PatCtx"><span class="hs-identifier hs-var">PatCtx</span></a></span><span> </span><span class="annot"><span class="annottext">HsPatSigType GhcPs
</span><a href="#local-6989586621681128281"><span class="hs-identifier hs-var">sig</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-416"></span><span>
</span><span id="line-417"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span id="local-6989586621681128277"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128277"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LitPat"><span class="hs-identifier hs-type">LitPat</span></a></span><span> </span><span id="local-6989586621681128275"><span class="annot"><span class="annottext">XLitPat GhcPs
</span><a href="#local-6989586621681128275"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681128274"><span class="annot"><span class="annottext">HsLit GhcPs
</span><a href="#local-6989586621681128274"><span class="hs-identifier hs-var">lit</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-418"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Hs.Lit.html#HsString"><span class="hs-identifier hs-type">HsString</span></a></span><span> </span><span id="local-6989586621681128272"><span class="annot"><span class="annottext">XHsString GhcPs
</span><a href="#local-6989586621681128272"><span class="hs-identifier hs-var">src</span></a></span></span><span> </span><span id="local-6989586621681128271"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681128271"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsLit GhcPs
</span><a href="#local-6989586621681128274"><span class="hs-identifier hs-var">lit</span></a></span><span>
</span><span id="line-419"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128270"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128270"><span class="hs-identifier hs-var">ovlStr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnM Bool -&gt; CpsRn Bool
forall a. RnM a -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCps"><span class="hs-identifier hs-var">liftCps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Extension -&gt; RnM Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#OverloadedStrings"><span class="hs-identifier hs-var">LangExt.OverloadedStrings</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-420"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128270"><span class="hs-identifier hs-var">ovlStr</span></a></span><span>
</span><span id="line-421"></span><span>         </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; Pat GhcPs -&gt; CpsRn (Pat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128277"><span class="hs-identifier hs-var">mk</span></a></span><span>
</span><span id="line-422"></span><span>                           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located (HsOverLit GhcPs) -&gt; Maybe (SyntaxExpr GhcPs) -&gt; Pat GhcPs
</span><a href="GHC.Hs.Utils.html#mkNPat"><span class="hs-identifier hs-var">mkNPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsOverLit GhcPs -&gt; Located (HsOverLit GhcPs)
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SourceText -&gt; FastString -&gt; HsOverLit GhcPs
</span><a href="GHC.Hs.Utils.html#mkHsIsString"><span class="hs-identifier hs-var">mkHsIsString</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
XHsString GhcPs
</span><a href="#local-6989586621681128272"><span class="hs-identifier hs-var">src</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681128271"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-423"></span><span>                                      </span><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcPs)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-424"></span><span>         </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">CpsRn (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128264"><span class="hs-identifier hs-var">normal_lit</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-425"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CpsRn (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128264"><span class="hs-identifier hs-var">normal_lit</span></a></span><span>
</span><span id="line-426"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-427"></span><span>    </span><span id="local-6989586621681128264"><span class="annot"><span class="annottext">normal_lit :: CpsRn (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128264"><span class="hs-identifier hs-var hs-var">normal_lit</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env TcGblEnv TcLclEnv) () -&gt; CpsRn ()
forall a. RnM a -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCps"><span class="hs-identifier hs-var">liftCps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsLit GhcPs -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall p. HsLit p -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Rename.Pat.html#rnLit"><span class="hs-identifier hs-var">rnLit</span></a></span><span> </span><span class="annot"><span class="annottext">HsLit GhcPs
</span><a href="#local-6989586621681128274"><span class="hs-identifier hs-var">lit</span></a></span><span class="hs-special">)</span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XLitPat (GhcPass 'Renamed)
-&gt; HsLit (GhcPass 'Renamed) -&gt; Pat (GhcPass 'Renamed)
forall p. XLitPat p -&gt; HsLit p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#LitPat"><span class="hs-identifier hs-var">LitPat</span></a></span><span> </span><span class="annot"><span class="annottext">XLitPat GhcPs
XLitPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128275"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsLit GhcPs -&gt; HsLit (GhcPass 'Renamed)
forall (p1 :: Pass) (p2 :: Pass).
HsLit (GhcPass p1) -&gt; HsLit (GhcPass p2)
</span><a href="GHC.Hs.Lit.html#convertLit"><span class="hs-identifier hs-var">convertLit</span></a></span><span> </span><span class="annot"><span class="annottext">HsLit GhcPs
</span><a href="#local-6989586621681128274"><span class="hs-identifier hs-var">lit</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-428"></span><span>
</span><span id="line-429"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#NPat"><span class="hs-identifier hs-type">NPat</span></a></span><span> </span><span id="local-6989586621681128261"><span class="annot"><span class="annottext">XNPat GhcPs
</span><a href="#local-6989586621681128261"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681128260"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128260"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621681128259"><span class="annot"><span class="annottext">HsOverLit GhcPs
</span><a href="#local-6989586621681128259"><span class="hs-identifier hs-var">lit</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681128258"><span class="annot"><span class="annottext">Maybe (SyntaxExpr GhcPs)
</span><a href="#local-6989586621681128258"><span class="hs-identifier hs-var">mb_neg</span></a></span></span><span> </span><span id="local-6989586621681128257"><span class="annot"><span class="annottext">SyntaxExpr GhcPs
</span><a href="#local-6989586621681128257"><span class="hs-identifier hs-var">_eq</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-430"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681128256"><span class="annot"><span class="annottext">HsOverLit (GhcPass 'Renamed)
</span><a href="#local-6989586621681128256"><span class="hs-identifier hs-var">lit'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681128255"><span class="annot"><span class="annottext">Maybe (HsExpr (GhcPass 'Renamed))
</span><a href="#local-6989586621681128255"><span class="hs-identifier hs-var">mb_neg'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnM
  ((HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))),
   FreeVars)
-&gt; CpsRn
     (HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed)))
forall a. RnM (a, FreeVars) -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCpsFV"><span class="hs-identifier hs-var">liftCpsFV</span></a></span><span> </span><span class="annot"><span class="annottext">(RnM
   ((HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))),
    FreeVars)
 -&gt; CpsRn
      (HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))))
-&gt; RnM
     ((HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))),
      FreeVars)
-&gt; CpsRn
     (HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed)))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HsOverLit GhcPs
-&gt; RnM
     ((HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))),
      FreeVars)
forall t.
HsOverLit t
-&gt; RnM
     ((HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))),
      FreeVars)
</span><a href="GHC.Rename.Pat.html#rnOverLit"><span class="hs-identifier hs-var">rnOverLit</span></a></span><span> </span><span class="annot"><span class="annottext">HsOverLit GhcPs
</span><a href="#local-6989586621681128259"><span class="hs-identifier hs-var">lit</span></a></span><span>
</span><span id="line-431"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128254"><span class="annot"><span class="annottext">Maybe SyntaxExprRn
</span><a href="#local-6989586621681128254"><span class="hs-identifier hs-var">mb_neg'</span></a></span></span><span> </span><span class="hs-comment">-- See Note [Negative zero]</span><span>
</span><span id="line-432"></span><span>           </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681128251"><span class="annot"><span class="annottext">negative :: IOEnv (Env TcGblEnv TcLclEnv) (Maybe SyntaxExprRn, FreeVars)
</span><a href="#local-6989586621681128251"><span class="hs-identifier hs-var hs-var">negative</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681128250"><span class="annot"><span class="annottext">SyntaxExprRn
</span><a href="#local-6989586621681128250"><span class="hs-identifier hs-var">neg</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681128249"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681128249"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Name -&gt; RnM (SyntaxExpr (GhcPass 'Renamed), FreeVars)
</span><a href="GHC.Rename.Env.html#lookupSyntax"><span class="hs-identifier hs-var">lookupSyntax</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Names.html#negateName"><span class="hs-identifier hs-var">negateName</span></a></span><span>
</span><span id="line-433"></span><span>                                </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(Maybe SyntaxExprRn, FreeVars)
-&gt; IOEnv (Env TcGblEnv TcLclEnv) (Maybe SyntaxExprRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SyntaxExprRn -&gt; Maybe SyntaxExprRn
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExprRn
</span><a href="#local-6989586621681128250"><span class="hs-identifier hs-var">neg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681128249"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-434"></span><span>                  </span><span id="local-6989586621681128245"><span class="annot"><span class="annottext">positive :: IOEnv (Env TcGblEnv TcLclEnv) (Maybe a, FreeVars)
</span><a href="#local-6989586621681128245"><span class="hs-identifier hs-var hs-var">positive</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Maybe a, FreeVars)
-&gt; IOEnv (Env TcGblEnv TcLclEnv) (Maybe a, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="GHC.Types.Name.Set.html#emptyFVs"><span class="hs-identifier hs-var">emptyFVs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-435"></span><span>              </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env TcGblEnv TcLclEnv) (Maybe SyntaxExprRn, FreeVars)
-&gt; CpsRn (Maybe SyntaxExprRn)
forall a. RnM (a, FreeVars) -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCpsFV"><span class="hs-identifier hs-var">liftCpsFV</span></a></span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env TcGblEnv TcLclEnv) (Maybe SyntaxExprRn, FreeVars)
 -&gt; CpsRn (Maybe SyntaxExprRn))
-&gt; IOEnv (Env TcGblEnv TcLclEnv) (Maybe SyntaxExprRn, FreeVars)
-&gt; CpsRn (Maybe SyntaxExprRn)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe NoExtField
Maybe (SyntaxExpr GhcPs)
</span><a href="#local-6989586621681128258"><span class="hs-identifier hs-var">mb_neg</span></a></span><span> </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (HsExpr (GhcPass 'Renamed))
</span><a href="#local-6989586621681128255"><span class="hs-identifier hs-var">mb_neg'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-436"></span><span>                                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe NoExtField
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env TcGblEnv TcLclEnv) (Maybe SyntaxExprRn, FreeVars)
</span><a href="#local-6989586621681128251"><span class="hs-identifier hs-var">negative</span></a></span><span>
</span><span id="line-437"></span><span>                                  </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (HsExpr (GhcPass 'Renamed))
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env TcGblEnv TcLclEnv) (Maybe SyntaxExprRn, FreeVars)
</span><a href="#local-6989586621681128251"><span class="hs-identifier hs-var">negative</span></a></span><span>
</span><span id="line-438"></span><span>                                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe NoExtField
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (HsExpr (GhcPass 'Renamed))
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env TcGblEnv TcLclEnv) (Maybe SyntaxExprRn, FreeVars)
forall {a}. IOEnv (Env TcGblEnv TcLclEnv) (Maybe a, FreeVars)
</span><a href="#local-6989586621681128245"><span class="hs-identifier hs-var">positive</span></a></span><span>
</span><span id="line-439"></span><span>                                  </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr (GhcPass 'Renamed)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env TcGblEnv TcLclEnv) (Maybe SyntaxExprRn, FreeVars)
forall {a}. IOEnv (Env TcGblEnv TcLclEnv) (Maybe a, FreeVars)
</span><a href="#local-6989586621681128245"><span class="hs-identifier hs-var">positive</span></a></span><span>
</span><span id="line-440"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128244"><span class="annot"><span class="annottext">SyntaxExprRn
</span><a href="#local-6989586621681128244"><span class="hs-identifier hs-var">eq'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env TcGblEnv TcLclEnv) (SyntaxExprRn, FreeVars)
-&gt; CpsRn SyntaxExprRn
forall a. RnM (a, FreeVars) -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCpsFV"><span class="hs-identifier hs-var">liftCpsFV</span></a></span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env TcGblEnv TcLclEnv) (SyntaxExprRn, FreeVars)
 -&gt; CpsRn SyntaxExprRn)
-&gt; IOEnv (Env TcGblEnv TcLclEnv) (SyntaxExprRn, FreeVars)
-&gt; CpsRn SyntaxExprRn
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; RnM (SyntaxExpr (GhcPass 'Renamed), FreeVars)
</span><a href="GHC.Rename.Env.html#lookupSyntax"><span class="hs-identifier hs-var">lookupSyntax</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Names.html#eqName"><span class="hs-identifier hs-var">eqName</span></a></span><span>
</span><span id="line-441"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XNPat (GhcPass 'Renamed)
-&gt; Located (HsOverLit (GhcPass 'Renamed))
-&gt; Maybe (SyntaxExpr (GhcPass 'Renamed))
-&gt; SyntaxExpr (GhcPass 'Renamed)
-&gt; Pat (GhcPass 'Renamed)
forall p.
XNPat p
-&gt; Located (HsOverLit p)
-&gt; Maybe (SyntaxExpr p)
-&gt; SyntaxExpr p
-&gt; Pat p
</span><a href="GHC.Hs.Pat.html#NPat"><span class="hs-identifier hs-var">NPat</span></a></span><span> </span><span class="annot"><span class="annottext">XNPat GhcPs
XNPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128261"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan
-&gt; HsOverLit (GhcPass 'Renamed)
-&gt; Located (HsOverLit (GhcPass 'Renamed))
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128260"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">HsOverLit (GhcPass 'Renamed)
</span><a href="#local-6989586621681128256"><span class="hs-identifier hs-var">lit'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe (SyntaxExpr (GhcPass 'Renamed))
Maybe SyntaxExprRn
</span><a href="#local-6989586621681128254"><span class="hs-identifier hs-var">mb_neg'</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr (GhcPass 'Renamed)
SyntaxExprRn
</span><a href="#local-6989586621681128244"><span class="hs-identifier hs-var">eq'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-442"></span><span>
</span><span id="line-443"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span id="local-6989586621681128242"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128242"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#NPlusKPat"><span class="hs-identifier hs-type">NPlusKPat</span></a></span><span> </span><span id="local-6989586621681128240"><span class="annot"><span class="annottext">XNPlusKPat GhcPs
</span><a href="#local-6989586621681128240"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681128239"><span class="annot"><span class="annottext">GenLocated SrcSpan (IdP GhcPs)
</span><a href="#local-6989586621681128239"><span class="hs-identifier hs-var">rdr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681128238"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128238"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621681128237"><span class="annot"><span class="annottext">HsOverLit GhcPs
</span><a href="#local-6989586621681128237"><span class="hs-identifier hs-var">lit</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsOverLit GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-444"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128236"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128236"><span class="hs-identifier hs-var">new_name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; Located RdrName -&gt; CpsRn Name
</span><a href="GHC.Rename.Pat.html#newPatName"><span class="hs-identifier hs-var">newPatName</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128242"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">Located RdrName
GenLocated SrcSpan (IdP GhcPs)
</span><a href="#local-6989586621681128239"><span class="hs-identifier hs-var">rdr</span></a></span><span>
</span><span id="line-445"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681128235"><span class="annot"><span class="annottext">HsOverLit (GhcPass 'Renamed)
</span><a href="#local-6989586621681128235"><span class="hs-identifier hs-var">lit'</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (HsExpr (GhcPass 'Renamed))
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnM
  ((HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))),
   FreeVars)
-&gt; CpsRn
     (HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed)))
forall a. RnM (a, FreeVars) -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCpsFV"><span class="hs-identifier hs-var">liftCpsFV</span></a></span><span> </span><span class="annot"><span class="annottext">(RnM
   ((HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))),
    FreeVars)
 -&gt; CpsRn
      (HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))))
-&gt; RnM
     ((HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))),
      FreeVars)
-&gt; CpsRn
     (HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed)))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HsOverLit GhcPs
-&gt; RnM
     ((HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))),
      FreeVars)
forall t.
HsOverLit t
-&gt; RnM
     ((HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))),
      FreeVars)
</span><a href="GHC.Rename.Pat.html#rnOverLit"><span class="hs-identifier hs-var">rnOverLit</span></a></span><span> </span><span class="annot"><span class="annottext">HsOverLit GhcPs
</span><a href="#local-6989586621681128237"><span class="hs-identifier hs-var">lit</span></a></span><span> </span><span class="hs-comment">-- See Note [Negative zero]</span><span>
</span><span id="line-446"></span><span>                                                </span><span class="hs-comment">-- We skip negateName as</span><span>
</span><span id="line-447"></span><span>                                                </span><span class="hs-comment">-- negative zero doesn't make</span><span>
</span><span id="line-448"></span><span>                                                </span><span class="hs-comment">-- sense in n + k patterns</span><span>
</span><span id="line-449"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128234"><span class="annot"><span class="annottext">SyntaxExprRn
</span><a href="#local-6989586621681128234"><span class="hs-identifier hs-var">minus</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env TcGblEnv TcLclEnv) (SyntaxExprRn, FreeVars)
-&gt; CpsRn SyntaxExprRn
forall a. RnM (a, FreeVars) -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCpsFV"><span class="hs-identifier hs-var">liftCpsFV</span></a></span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env TcGblEnv TcLclEnv) (SyntaxExprRn, FreeVars)
 -&gt; CpsRn SyntaxExprRn)
-&gt; IOEnv (Env TcGblEnv TcLclEnv) (SyntaxExprRn, FreeVars)
-&gt; CpsRn SyntaxExprRn
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; RnM (SyntaxExpr (GhcPass 'Renamed), FreeVars)
</span><a href="GHC.Rename.Env.html#lookupSyntax"><span class="hs-identifier hs-var">lookupSyntax</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Names.html#minusName"><span class="hs-identifier hs-var">minusName</span></a></span><span>
</span><span id="line-450"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128232"><span class="annot"><span class="annottext">SyntaxExprRn
</span><a href="#local-6989586621681128232"><span class="hs-identifier hs-var">ge</span></a></span></span><span>    </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env TcGblEnv TcLclEnv) (SyntaxExprRn, FreeVars)
-&gt; CpsRn SyntaxExprRn
forall a. RnM (a, FreeVars) -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCpsFV"><span class="hs-identifier hs-var">liftCpsFV</span></a></span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env TcGblEnv TcLclEnv) (SyntaxExprRn, FreeVars)
 -&gt; CpsRn SyntaxExprRn)
-&gt; IOEnv (Env TcGblEnv TcLclEnv) (SyntaxExprRn, FreeVars)
-&gt; CpsRn SyntaxExprRn
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; RnM (SyntaxExpr (GhcPass 'Renamed), FreeVars)
</span><a href="GHC.Rename.Env.html#lookupSyntax"><span class="hs-identifier hs-var">lookupSyntax</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Names.html#geName"><span class="hs-identifier hs-var">geName</span></a></span><span>
</span><span id="line-451"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XNPlusKPat (GhcPass 'Renamed)
-&gt; Located (IdP (GhcPass 'Renamed))
-&gt; Located (HsOverLit (GhcPass 'Renamed))
-&gt; HsOverLit (GhcPass 'Renamed)
-&gt; SyntaxExpr (GhcPass 'Renamed)
-&gt; SyntaxExpr (GhcPass 'Renamed)
-&gt; Pat (GhcPass 'Renamed)
forall p.
XNPlusKPat p
-&gt; Located (IdP p)
-&gt; Located (HsOverLit p)
-&gt; HsOverLit p
-&gt; SyntaxExpr p
-&gt; SyntaxExpr p
-&gt; Pat p
</span><a href="GHC.Hs.Pat.html#NPlusKPat"><span class="hs-identifier hs-var">NPlusKPat</span></a></span><span> </span><span class="annot"><span class="annottext">XNPlusKPat GhcPs
XNPlusKPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128240"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; Name -&gt; Located Name
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; SrcSpan
</span><a href="GHC.Types.Name.html#nameSrcSpan"><span class="hs-identifier hs-var">nameSrcSpan</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128236"><span class="hs-identifier hs-var">new_name</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128236"><span class="hs-identifier hs-var">new_name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-452"></span><span>                             </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan
-&gt; HsOverLit (GhcPass 'Renamed)
-&gt; Located (HsOverLit (GhcPass 'Renamed))
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128238"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">HsOverLit (GhcPass 'Renamed)
</span><a href="#local-6989586621681128235"><span class="hs-identifier hs-var">lit'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsOverLit (GhcPass 'Renamed)
</span><a href="#local-6989586621681128235"><span class="hs-identifier hs-var">lit'</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr (GhcPass 'Renamed)
SyntaxExprRn
</span><a href="#local-6989586621681128232"><span class="hs-identifier hs-var">ge</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr (GhcPass 'Renamed)
SyntaxExprRn
</span><a href="#local-6989586621681128234"><span class="hs-identifier hs-var">minus</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-453"></span><span>                </span><span class="hs-comment">-- The Report says that n+k patterns must be in Integral</span><span>
</span><span id="line-454"></span><span>
</span><span id="line-455"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span id="local-6989586621681128229"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128229"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#AsPat"><span class="hs-identifier hs-type">AsPat</span></a></span><span> </span><span id="local-6989586621681128227"><span class="annot"><span class="annottext">XAsPat GhcPs
</span><a href="#local-6989586621681128227"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681128226"><span class="annot"><span class="annottext">GenLocated SrcSpan (IdP GhcPs)
</span><a href="#local-6989586621681128226"><span class="hs-identifier hs-var">rdr</span></a></span></span><span> </span><span id="local-6989586621681128225"><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128225"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-456"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128224"><span class="annot"><span class="annottext">Located Name
</span><a href="#local-6989586621681128224"><span class="hs-identifier hs-var">new_name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; Located RdrName -&gt; CpsRn (Located Name)
</span><a href="GHC.Rename.Pat.html#newPatLName"><span class="hs-identifier hs-var">newPatLName</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128229"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">Located RdrName
GenLocated SrcSpan (IdP GhcPs)
</span><a href="#local-6989586621681128226"><span class="hs-identifier hs-var">rdr</span></a></span><span>
</span><span id="line-457"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128223"><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128223"><span class="hs-identifier hs-var">pat'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; LPat GhcPs -&gt; CpsRn (LPat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnLPatAndThen"><span class="hs-identifier hs-var">rnLPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128229"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128225"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-458"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XAsPat (GhcPass 'Renamed)
-&gt; Located (IdP (GhcPass 'Renamed))
-&gt; LPat (GhcPass 'Renamed)
-&gt; Pat (GhcPass 'Renamed)
forall p. XAsPat p -&gt; Located (IdP p) -&gt; LPat p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#AsPat"><span class="hs-identifier hs-var">AsPat</span></a></span><span> </span><span class="annot"><span class="annottext">XAsPat GhcPs
XAsPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128227"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Located Name
Located (IdP (GhcPass 'Renamed))
</span><a href="#local-6989586621681128224"><span class="hs-identifier hs-var">new_name</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
LPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128223"><span class="hs-identifier hs-var">pat'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-459"></span><span>
</span><span id="line-460"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span id="local-6989586621681128222"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128222"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span id="local-6989586621681128221"><span class="annot"><span class="annottext">p :: Pat GhcPs
</span><a href="#local-6989586621681128221"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ViewPat"><span class="hs-identifier hs-type">ViewPat</span></a></span><span> </span><span id="local-6989586621681128219"><span class="annot"><span class="annottext">XViewPat GhcPs
</span><a href="#local-6989586621681128219"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681128218"><span class="annot"><span class="annottext">LHsExpr GhcPs
</span><a href="#local-6989586621681128218"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span id="local-6989586621681128217"><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128217"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-461"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env TcGblEnv TcLclEnv) () -&gt; CpsRn ()
forall a. RnM a -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCps"><span class="hs-identifier hs-var">liftCps</span></a></span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env TcGblEnv TcLclEnv) () -&gt; CpsRn ())
-&gt; IOEnv (Env TcGblEnv TcLclEnv) () -&gt; CpsRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128216"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128216"><span class="hs-identifier hs-var">vp_flag</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; RnM Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#ViewPatterns"><span class="hs-identifier hs-var">LangExt.ViewPatterns</span></a></span><span>
</span><span id="line-462"></span><span>                      </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; MsgDoc -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Tc.Utils.Monad.html#checkErr"><span class="hs-identifier hs-var">checkErr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128216"><span class="hs-identifier hs-var">vp_flag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Pat GhcPs -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#badViewPat"><span class="hs-identifier hs-var">badViewPat</span></a></span><span> </span><span class="annot"><span class="annottext">Pat GhcPs
</span><a href="#local-6989586621681128221"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-463"></span><span>         </span><span class="hs-comment">-- Because of the way we're arranging the recursive calls,</span><span>
</span><span id="line-464"></span><span>         </span><span class="hs-comment">-- this will be in the right context</span><span>
</span><span id="line-465"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128212"><span class="annot"><span class="annottext">LHsExpr (GhcPass 'Renamed)
</span><a href="#local-6989586621681128212"><span class="hs-identifier hs-var">expr'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnM (LHsExpr (GhcPass 'Renamed), FreeVars)
-&gt; CpsRn (LHsExpr (GhcPass 'Renamed))
forall a. RnM (a, FreeVars) -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCpsFV"><span class="hs-identifier hs-var">liftCpsFV</span></a></span><span> </span><span class="annot"><span class="annottext">(RnM (LHsExpr (GhcPass 'Renamed), FreeVars)
 -&gt; CpsRn (LHsExpr (GhcPass 'Renamed)))
-&gt; RnM (LHsExpr (GhcPass 'Renamed), FreeVars)
-&gt; CpsRn (LHsExpr (GhcPass 'Renamed))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcPs -&gt; RnM (LHsExpr (GhcPass 'Renamed), FreeVars)
</span><a href="GHC.Rename.Expr.html#rnLExpr"><span class="hs-identifier hs-var">rnLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcPs
</span><a href="#local-6989586621681128218"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-466"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128211"><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128211"><span class="hs-identifier hs-var">pat'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; LPat GhcPs -&gt; CpsRn (LPat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnLPatAndThen"><span class="hs-identifier hs-var">rnLPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128222"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128217"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-467"></span><span>       </span><span class="hs-comment">-- Note: at this point the PreTcType in ty can only be a placeHolder</span><span>
</span><span id="line-468"></span><span>       </span><span class="hs-comment">-- ; return (ViewPat expr' pat' ty) }</span><span>
</span><span id="line-469"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XViewPat (GhcPass 'Renamed)
-&gt; LHsExpr (GhcPass 'Renamed)
-&gt; LPat (GhcPass 'Renamed)
-&gt; Pat (GhcPass 'Renamed)
forall p. XViewPat p -&gt; LHsExpr p -&gt; LPat p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#ViewPat"><span class="hs-identifier hs-var">ViewPat</span></a></span><span> </span><span class="annot"><span class="annottext">XViewPat GhcPs
XViewPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128219"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr (GhcPass 'Renamed)
</span><a href="#local-6989586621681128212"><span class="hs-identifier hs-var">expr'</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
LPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128211"><span class="hs-identifier hs-var">pat'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-470"></span><span>
</span><span id="line-471"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span id="local-6989586621681128210"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128210"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-type">ConPat</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XConPat GhcPs
</span><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-var">NoExtField</span></a></span><span> </span><span id="local-6989586621681128207"><span class="annot"><span class="annottext">Located (ConLikeP GhcPs)
</span><a href="#local-6989586621681128207"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span id="local-6989586621681128206"><span class="annot"><span class="annottext">HsConPatDetails GhcPs
</span><a href="#local-6989586621681128206"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-472"></span><span>   </span><span class="hs-comment">-- rnConPatAndThen takes care of reconstructing the pattern</span><span>
</span><span id="line-473"></span><span>   </span><span class="hs-comment">-- The pattern for the empty list needs to be replaced by an empty explicit list pattern when overloaded lists is turned on.</span><span>
</span><span id="line-474"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Located RdrName -&gt; RdrName
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Located RdrName
Located (ConLikeP GhcPs)
</span><a href="#local-6989586621681128207"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName -&gt; RdrName -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Name -&gt; RdrName
</span><a href="GHC.Types.Name.Reader.html#nameRdrName"><span class="hs-identifier hs-var">nameRdrName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; Name
</span><a href="GHC.Core.DataCon.html#dataConName"><span class="hs-identifier hs-var">dataConName</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="GHC.Builtin.Types.html#nilDataCon"><span class="hs-identifier hs-var">nilDataCon</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-475"></span><span>      </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128203"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128203"><span class="hs-identifier hs-var">ol_flag</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnM Bool -&gt; CpsRn Bool
forall a. RnM a -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCps"><span class="hs-identifier hs-var">liftCps</span></a></span><span> </span><span class="annot"><span class="annottext">(RnM Bool -&gt; CpsRn Bool) -&gt; RnM Bool -&gt; CpsRn Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Extension -&gt; RnM Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#OverloadedLists"><span class="hs-identifier hs-var">LangExt.OverloadedLists</span></a></span><span>
</span><span id="line-476"></span><span>                    </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128203"><span class="hs-identifier hs-var">ol_flag</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; Pat GhcPs -&gt; CpsRn (Pat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128210"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XListPat GhcPs -&gt; [LPat GhcPs] -&gt; Pat GhcPs
forall p. XListPat p -&gt; [LPat p] -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#ListPat"><span class="hs-identifier hs-var">ListPat</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XListPat GhcPs
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-477"></span><span>                                 </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">NameMaker
-&gt; Located RdrName
-&gt; HsConPatDetails GhcPs
-&gt; CpsRn (Pat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnConPatAndThen"><span class="hs-identifier hs-var">rnConPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128210"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">Located RdrName
Located (ConLikeP GhcPs)
</span><a href="#local-6989586621681128207"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">HsConPatDetails GhcPs
</span><a href="#local-6989586621681128206"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">}</span><span>
</span><span id="line-478"></span><span>      </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">NameMaker
-&gt; Located RdrName
-&gt; HsConPatDetails GhcPs
-&gt; CpsRn (Pat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnConPatAndThen"><span class="hs-identifier hs-var">rnConPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128210"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">Located RdrName
Located (ConLikeP GhcPs)
</span><a href="#local-6989586621681128207"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">HsConPatDetails GhcPs
</span><a href="#local-6989586621681128206"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-479"></span><span>
</span><span id="line-480"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span id="local-6989586621681128199"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128199"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ListPat"><span class="hs-identifier hs-type">ListPat</span></a></span><span> </span><span class="annot"><span class="annottext">XListPat GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128198"><span class="annot"><span class="annottext">[LPat GhcPs]
</span><a href="#local-6989586621681128198"><span class="hs-identifier hs-var">pats</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-481"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128197"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128197"><span class="hs-identifier hs-var">opt_OverloadedLists</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnM Bool -&gt; CpsRn Bool
forall a. RnM a -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCps"><span class="hs-identifier hs-var">liftCps</span></a></span><span> </span><span class="annot"><span class="annottext">(RnM Bool -&gt; CpsRn Bool) -&gt; RnM Bool -&gt; CpsRn Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Extension -&gt; RnM Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#OverloadedLists"><span class="hs-identifier hs-var">LangExt.OverloadedLists</span></a></span><span>
</span><span id="line-482"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128196"><span class="annot"><span class="annottext">[Located (Pat (GhcPass 'Renamed))]
</span><a href="#local-6989586621681128196"><span class="hs-identifier hs-var">pats'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; [LPat GhcPs] -&gt; CpsRn [LPat (GhcPass 'Renamed)]
</span><a href="GHC.Rename.Pat.html#rnLPatsAndThen"><span class="hs-identifier hs-var">rnLPatsAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128199"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">[LPat GhcPs]
</span><a href="#local-6989586621681128198"><span class="hs-identifier hs-var">pats</span></a></span><span>
</span><span id="line-483"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128197"><span class="hs-identifier hs-var">opt_OverloadedLists</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-484"></span><span>          </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681128195"><span class="annot"><span class="annottext">SyntaxExprRn
</span><a href="#local-6989586621681128195"><span class="hs-identifier hs-var">to_list_name</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">FreeVars
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env TcGblEnv TcLclEnv) (SyntaxExprRn, FreeVars)
-&gt; CpsRn (SyntaxExprRn, FreeVars)
forall a. RnM a -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCps"><span class="hs-identifier hs-var">liftCps</span></a></span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env TcGblEnv TcLclEnv) (SyntaxExprRn, FreeVars)
 -&gt; CpsRn (SyntaxExprRn, FreeVars))
-&gt; IOEnv (Env TcGblEnv TcLclEnv) (SyntaxExprRn, FreeVars)
-&gt; CpsRn (SyntaxExprRn, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; RnM (SyntaxExpr (GhcPass 'Renamed), FreeVars)
</span><a href="GHC.Rename.Env.html#lookupSyntax"><span class="hs-identifier hs-var">lookupSyntax</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Names.html#toListName"><span class="hs-identifier hs-var">toListName</span></a></span><span>
</span><span id="line-485"></span><span>                     </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XListPat (GhcPass 'Renamed)
-&gt; [LPat (GhcPass 'Renamed)] -&gt; Pat (GhcPass 'Renamed)
forall p. XListPat p -&gt; [LPat p] -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#ListPat"><span class="hs-identifier hs-var">ListPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SyntaxExprRn -&gt; Maybe SyntaxExprRn
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExprRn
</span><a href="#local-6989586621681128195"><span class="hs-identifier hs-var">to_list_name</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Located (Pat (GhcPass 'Renamed))]
[LPat (GhcPass 'Renamed)]
</span><a href="#local-6989586621681128196"><span class="hs-identifier hs-var">pats'</span></a></span><span class="hs-special">)</span><span class="hs-special">}</span><span>
</span><span id="line-486"></span><span>          </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XListPat (GhcPass 'Renamed)
-&gt; [LPat (GhcPass 'Renamed)] -&gt; Pat (GhcPass 'Renamed)
forall p. XListPat p -&gt; [LPat p] -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#ListPat"><span class="hs-identifier hs-var">ListPat</span></a></span><span> </span><span class="annot"><span class="annottext">XListPat (GhcPass 'Renamed)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (Pat (GhcPass 'Renamed))]
[LPat (GhcPass 'Renamed)]
</span><a href="#local-6989586621681128196"><span class="hs-identifier hs-var">pats'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-487"></span><span>
</span><span id="line-488"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span id="local-6989586621681128193"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128193"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#TuplePat"><span class="hs-identifier hs-type">TuplePat</span></a></span><span> </span><span id="local-6989586621681128191"><span class="annot"><span class="annottext">XTuplePat GhcPs
</span><a href="#local-6989586621681128191"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681128190"><span class="annot"><span class="annottext">[LPat GhcPs]
</span><a href="#local-6989586621681128190"><span class="hs-identifier hs-var">pats</span></a></span></span><span> </span><span id="local-6989586621681128189"><span class="annot"><span class="annottext">Boxity
</span><a href="#local-6989586621681128189"><span class="hs-identifier hs-var">boxed</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-489"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">IOEnv (Env TcGblEnv TcLclEnv) () -&gt; CpsRn ()
forall a. RnM a -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCps"><span class="hs-identifier hs-var">liftCps</span></a></span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env TcGblEnv TcLclEnv) () -&gt; CpsRn ())
-&gt; IOEnv (Env TcGblEnv TcLclEnv) () -&gt; CpsRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Rename.Utils.html#checkTupSize"><span class="hs-identifier hs-var">checkTupSize</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Located (Pat GhcPs)] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (Pat GhcPs)]
[LPat GhcPs]
</span><a href="#local-6989586621681128190"><span class="hs-identifier hs-var">pats</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-490"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128187"><span class="annot"><span class="annottext">[Located (Pat (GhcPass 'Renamed))]
</span><a href="#local-6989586621681128187"><span class="hs-identifier hs-var">pats'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; [LPat GhcPs] -&gt; CpsRn [LPat (GhcPass 'Renamed)]
</span><a href="GHC.Rename.Pat.html#rnLPatsAndThen"><span class="hs-identifier hs-var">rnLPatsAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128193"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">[LPat GhcPs]
</span><a href="#local-6989586621681128190"><span class="hs-identifier hs-var">pats</span></a></span><span>
</span><span id="line-491"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XTuplePat (GhcPass 'Renamed)
-&gt; [LPat (GhcPass 'Renamed)] -&gt; Boxity -&gt; Pat (GhcPass 'Renamed)
forall p. XTuplePat p -&gt; [LPat p] -&gt; Boxity -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#TuplePat"><span class="hs-identifier hs-var">TuplePat</span></a></span><span> </span><span class="annot"><span class="annottext">XTuplePat GhcPs
XTuplePat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128191"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (Pat (GhcPass 'Renamed))]
[LPat (GhcPass 'Renamed)]
</span><a href="#local-6989586621681128187"><span class="hs-identifier hs-var">pats'</span></a></span><span> </span><span class="annot"><span class="annottext">Boxity
</span><a href="#local-6989586621681128189"><span class="hs-identifier hs-var">boxed</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-492"></span><span>
</span><span id="line-493"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span id="local-6989586621681128186"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128186"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#SumPat"><span class="hs-identifier hs-type">SumPat</span></a></span><span> </span><span id="local-6989586621681128184"><span class="annot"><span class="annottext">XSumPat GhcPs
</span><a href="#local-6989586621681128184"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681128183"><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128183"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span id="local-6989586621681128182"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681128182"><span class="hs-identifier hs-var">alt</span></a></span></span><span> </span><span id="local-6989586621681128181"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681128181"><span class="hs-identifier hs-var">arity</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-494"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128180"><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128180"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; LPat GhcPs -&gt; CpsRn (LPat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnLPatAndThen"><span class="hs-identifier hs-var">rnLPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128186"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128183"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-495"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XSumPat (GhcPass 'Renamed)
-&gt; LPat (GhcPass 'Renamed) -&gt; Int -&gt; Int -&gt; Pat (GhcPass 'Renamed)
forall p. XSumPat p -&gt; LPat p -&gt; Int -&gt; Int -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#SumPat"><span class="hs-identifier hs-var">SumPat</span></a></span><span> </span><span class="annot"><span class="annottext">XSumPat GhcPs
XSumPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128184"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
LPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128180"><span class="hs-identifier hs-var">pat</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681128182"><span class="hs-identifier hs-var">alt</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681128181"><span class="hs-identifier hs-var">arity</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-496"></span><span>       </span><span class="hs-special">}</span><span>
</span><span id="line-497"></span><span>
</span><span id="line-498"></span><span class="hs-comment">-- If a splice has been run already, just rename the result.</span><span>
</span><span id="line-499"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span id="local-6989586621681128179"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128179"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#SplicePat"><span class="hs-identifier hs-type">SplicePat</span></a></span><span> </span><span id="local-6989586621681128177"><span class="annot"><span class="annottext">XSplicePat GhcPs
</span><a href="#local-6989586621681128177"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsSpliced"><span class="hs-identifier hs-type">HsSpliced</span></a></span><span> </span><span id="local-6989586621681128175"><span class="annot"><span class="annottext">XSpliced GhcPs
</span><a href="#local-6989586621681128175"><span class="hs-identifier hs-var">x2</span></a></span></span><span> </span><span id="local-6989586621681128174"><span class="annot"><span class="annottext">ThModFinalizers
</span><a href="#local-6989586621681128174"><span class="hs-identifier hs-var">mfs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsSplicedPat"><span class="hs-identifier hs-type">HsSplicedPat</span></a></span><span> </span><span id="local-6989586621681128172"><span class="annot"><span class="annottext">Pat GhcPs
</span><a href="#local-6989586621681128172"><span class="hs-identifier hs-var">pat</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-500"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">XSplicePat (GhcPass 'Renamed)
-&gt; HsSplice (GhcPass 'Renamed) -&gt; Pat (GhcPass 'Renamed)
forall p. XSplicePat p -&gt; HsSplice p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#SplicePat"><span class="hs-identifier hs-var">SplicePat</span></a></span><span> </span><span class="annot"><span class="annottext">XSplicePat GhcPs
XSplicePat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128177"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">(HsSplice (GhcPass 'Renamed) -&gt; Pat (GhcPass 'Renamed))
-&gt; (Pat (GhcPass 'Renamed) -&gt; HsSplice (GhcPass 'Renamed))
-&gt; Pat (GhcPass 'Renamed)
-&gt; Pat (GhcPass 'Renamed)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">XSpliced (GhcPass 'Renamed)
-&gt; ThModFinalizers
-&gt; HsSplicedThing (GhcPass 'Renamed)
-&gt; HsSplice (GhcPass 'Renamed)
forall id.
XSpliced id -&gt; ThModFinalizers -&gt; HsSplicedThing id -&gt; HsSplice id
</span><a href="GHC.Hs.Expr.html#HsSpliced"><span class="hs-identifier hs-var">HsSpliced</span></a></span><span> </span><span class="annot"><span class="annottext">XSpliced GhcPs
XSpliced (GhcPass 'Renamed)
</span><a href="#local-6989586621681128175"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">ThModFinalizers
</span><a href="#local-6989586621681128174"><span class="hs-identifier hs-var">mfs</span></a></span><span> </span><span class="annot"><span class="annottext">(HsSplicedThing (GhcPass 'Renamed) -&gt; HsSplice (GhcPass 'Renamed))
-&gt; (Pat (GhcPass 'Renamed) -&gt; HsSplicedThing (GhcPass 'Renamed))
-&gt; Pat (GhcPass 'Renamed)
-&gt; HsSplice (GhcPass 'Renamed)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; HsSplicedThing (GhcPass 'Renamed)
forall id. Pat id -&gt; HsSplicedThing id
</span><a href="GHC.Hs.Expr.html#HsSplicedPat"><span class="hs-identifier hs-var">HsSplicedPat</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat (GhcPass 'Renamed) -&gt; Pat (GhcPass 'Renamed))
-&gt; CpsRn (Pat (GhcPass 'Renamed)) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; Pat GhcPs -&gt; CpsRn (Pat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128179"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">Pat GhcPs
</span><a href="#local-6989586621681128172"><span class="hs-identifier hs-var">pat</span></a></span><span>
</span><span id="line-501"></span><span>
</span><span id="line-502"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span id="local-6989586621681128169"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128169"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#SplicePat"><span class="hs-identifier hs-type">SplicePat</span></a></span><span> </span><span class="annot"><span class="annottext">XSplicePat GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128168"><span class="annot"><span class="annottext">HsSplice GhcPs
</span><a href="#local-6989586621681128168"><span class="hs-identifier hs-var">splice</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-503"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128167"><span class="annot"><span class="annottext">Either (Pat GhcPs) (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128167"><span class="hs-identifier hs-var">eith</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnM (Either (Pat GhcPs) (Pat (GhcPass 'Renamed)), FreeVars)
-&gt; CpsRn (Either (Pat GhcPs) (Pat (GhcPass 'Renamed)))
forall a. RnM (a, FreeVars) -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCpsFV"><span class="hs-identifier hs-var">liftCpsFV</span></a></span><span> </span><span class="annot"><span class="annottext">(RnM (Either (Pat GhcPs) (Pat (GhcPass 'Renamed)), FreeVars)
 -&gt; CpsRn (Either (Pat GhcPs) (Pat (GhcPass 'Renamed))))
-&gt; RnM (Either (Pat GhcPs) (Pat (GhcPass 'Renamed)), FreeVars)
-&gt; CpsRn (Either (Pat GhcPs) (Pat (GhcPass 'Renamed)))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HsSplice GhcPs
-&gt; RnM (Either (Pat GhcPs) (Pat (GhcPass 'Renamed)), FreeVars)
</span><a href="GHC.Rename.Splice.html#rnSplicePat"><span class="hs-identifier hs-var">rnSplicePat</span></a></span><span> </span><span class="annot"><span class="annottext">HsSplice GhcPs
</span><a href="#local-6989586621681128168"><span class="hs-identifier hs-var">splice</span></a></span><span>
</span><span id="line-504"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either (Pat GhcPs) (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128167"><span class="hs-identifier hs-var">eith</span></a></span><span> </span><span class="hs-keyword">of</span><span>   </span><span class="hs-comment">-- See Note [rnSplicePat] in GHC.Rename.Splice</span><span>
</span><span id="line-505"></span><span>           </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span>  </span><span id="local-6989586621681128166"><span class="annot"><span class="annottext">Pat GhcPs
</span><a href="#local-6989586621681128166"><span class="hs-identifier hs-var">not_yet_renamed</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; Pat GhcPs -&gt; CpsRn (Pat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnPatAndThen"><span class="hs-identifier hs-var">rnPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128169"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">Pat GhcPs
</span><a href="#local-6989586621681128166"><span class="hs-identifier hs-var">not_yet_renamed</span></a></span><span>
</span><span id="line-506"></span><span>           </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621681128165"><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128165"><span class="hs-identifier hs-var">already_renamed</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128165"><span class="hs-identifier hs-var">already_renamed</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-507"></span><span>
</span><span id="line-508"></span><span class="hs-comment">--------------------</span><span>
</span><span id="line-509"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnConPatAndThen"><span class="hs-identifier hs-type">rnConPatAndThen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#NameMaker"><span class="hs-identifier hs-type">NameMaker</span></a></span><span>
</span><span id="line-510"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span>    </span><span class="hs-comment">-- the constructor</span><span>
</span><span id="line-511"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsConPatDetails"><span class="hs-identifier hs-type">HsConPatDetails</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-512"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-513"></span><span>
</span><span id="line-514"></span><span id="rnConPatAndThen"><span class="annot"><span class="annottext">rnConPatAndThen :: NameMaker
-&gt; Located RdrName
-&gt; HsConPatDetails GhcPs
-&gt; CpsRn (Pat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnConPatAndThen"><span class="hs-identifier hs-var hs-var">rnConPatAndThen</span></a></span></span><span> </span><span id="local-6989586621681128164"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128164"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span id="local-6989586621681128163"><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681128163"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#PrefixCon"><span class="hs-identifier hs-type">PrefixCon</span></a></span><span> </span><span id="local-6989586621681128161"><span class="annot"><span class="annottext">[LPat GhcPs]
</span><a href="#local-6989586621681128161"><span class="hs-identifier hs-var">pats</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-515"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128160"><span class="annot"><span class="annottext">Located Name
</span><a href="#local-6989586621681128160"><span class="hs-identifier hs-var">con'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Located RdrName -&gt; CpsRn (Located Name)
</span><a href="GHC.Rename.Pat.html#lookupConCps"><span class="hs-identifier hs-var">lookupConCps</span></a></span><span> </span><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681128163"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-516"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128159"><span class="annot"><span class="annottext">[Located (Pat (GhcPass 'Renamed))]
</span><a href="#local-6989586621681128159"><span class="hs-identifier hs-var">pats'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; [LPat GhcPs] -&gt; CpsRn [LPat (GhcPass 'Renamed)]
</span><a href="GHC.Rename.Pat.html#rnLPatsAndThen"><span class="hs-identifier hs-var">rnLPatsAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128164"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">[LPat GhcPs]
</span><a href="#local-6989586621681128161"><span class="hs-identifier hs-var">pats</span></a></span><span>
</span><span id="line-517"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed)))
-&gt; Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConPat :: forall p.
XConPat p -&gt; Located (ConLikeP p) -&gt; HsConPatDetails p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-type">ConPat</span></a></span><span>
</span><span id="line-518"></span><span>            </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">pat_con_ext :: XConPat (GhcPass 'Renamed)
</span><a href="GHC.Hs.Pat.html#pat_con_ext"><span class="hs-identifier hs-var">pat_con_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NoExtField
XConPat (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span>
</span><span id="line-519"></span><span>            </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_con :: Located (ConLikeP (GhcPass 'Renamed))
</span><a href="GHC.Hs.Pat.html#pat_con"><span class="hs-identifier hs-var">pat_con</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Located Name
Located (ConLikeP (GhcPass 'Renamed))
</span><a href="#local-6989586621681128160"><span class="hs-identifier hs-var">con'</span></a></span><span>
</span><span id="line-520"></span><span>            </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_args :: HsConPatDetails (GhcPass 'Renamed)
</span><a href="GHC.Hs.Pat.html#pat_args"><span class="hs-identifier hs-var">pat_args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Located (Pat (GhcPass 'Renamed))]
-&gt; HsConDetails
     (Located (Pat (GhcPass 'Renamed)))
     (HsRecFields (GhcPass 'Renamed) (Located (Pat (GhcPass 'Renamed))))
forall arg rec. [arg] -&gt; HsConDetails arg rec
</span><a href="GHC.Hs.Type.html#PrefixCon"><span class="hs-identifier hs-var">PrefixCon</span></a></span><span> </span><span class="annot"><span class="annottext">[Located (Pat (GhcPass 'Renamed))]
</span><a href="#local-6989586621681128159"><span class="hs-identifier hs-var">pats'</span></a></span><span>
</span><span id="line-521"></span><span>            </span><span class="hs-special">}</span><span>
</span><span id="line-522"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-523"></span><span>
</span><span id="line-524"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnConPatAndThen"><span class="hs-identifier hs-var">rnConPatAndThen</span></a></span><span> </span><span id="local-6989586621681128155"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128155"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span id="local-6989586621681128154"><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681128154"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#InfixCon"><span class="hs-identifier hs-type">InfixCon</span></a></span><span> </span><span id="local-6989586621681128152"><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128152"><span class="hs-identifier hs-var">pat1</span></a></span></span><span> </span><span id="local-6989586621681128151"><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128151"><span class="hs-identifier hs-var">pat2</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-525"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128150"><span class="annot"><span class="annottext">Located Name
</span><a href="#local-6989586621681128150"><span class="hs-identifier hs-var">con'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Located RdrName -&gt; CpsRn (Located Name)
</span><a href="GHC.Rename.Pat.html#lookupConCps"><span class="hs-identifier hs-var">lookupConCps</span></a></span><span> </span><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681128154"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-526"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128149"><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128149"><span class="hs-identifier hs-var">pat1'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; LPat GhcPs -&gt; CpsRn (LPat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnLPatAndThen"><span class="hs-identifier hs-var">rnLPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128155"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128152"><span class="hs-identifier hs-var">pat1</span></a></span><span>
</span><span id="line-527"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128148"><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128148"><span class="hs-identifier hs-var">pat2'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; LPat GhcPs -&gt; CpsRn (LPat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnLPatAndThen"><span class="hs-identifier hs-var">rnLPatAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128155"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcPs
</span><a href="#local-6989586621681128151"><span class="hs-identifier hs-var">pat2</span></a></span><span>
</span><span id="line-528"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128147"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681128147"><span class="hs-identifier hs-var">fixity</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnM Fixity -&gt; CpsRn Fixity
forall a. RnM a -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCps"><span class="hs-identifier hs-var">liftCps</span></a></span><span> </span><span class="annot"><span class="annottext">(RnM Fixity -&gt; CpsRn Fixity) -&gt; RnM Fixity -&gt; CpsRn Fixity
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; RnM Fixity
</span><a href="GHC.Rename.Fixity.html#lookupFixityRn"><span class="hs-identifier hs-var">lookupFixityRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located Name -&gt; Name
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Located Name
</span><a href="#local-6989586621681128150"><span class="hs-identifier hs-var">con'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-529"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">RnM (Pat (GhcPass 'Renamed)) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall a. RnM a -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCps"><span class="hs-identifier hs-var">liftCps</span></a></span><span> </span><span class="annot"><span class="annottext">(RnM (Pat (GhcPass 'Renamed)) -&gt; CpsRn (Pat (GhcPass 'Renamed)))
-&gt; RnM (Pat (GhcPass 'Renamed)) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Located Name
-&gt; Fixity
-&gt; LPat (GhcPass 'Renamed)
-&gt; LPat (GhcPass 'Renamed)
-&gt; RnM (Pat (GhcPass 'Renamed))
</span><a href="GHC.Rename.HsType.html#mkConOpPatRn"><span class="hs-identifier hs-var">mkConOpPatRn</span></a></span><span> </span><span class="annot"><span class="annottext">Located Name
</span><a href="#local-6989586621681128150"><span class="hs-identifier hs-var">con'</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681128147"><span class="hs-identifier hs-var">fixity</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
LPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128149"><span class="hs-identifier hs-var">pat1'</span></a></span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
LPat (GhcPass 'Renamed)
</span><a href="#local-6989586621681128148"><span class="hs-identifier hs-var">pat2'</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-530"></span><span>
</span><span id="line-531"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnConPatAndThen"><span class="hs-identifier hs-var">rnConPatAndThen</span></a></span><span> </span><span id="local-6989586621681128144"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128144"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span id="local-6989586621681128143"><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681128143"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#RecCon"><span class="hs-identifier hs-type">RecCon</span></a></span><span> </span><span id="local-6989586621681128141"><span class="annot"><span class="annottext">HsRecFields GhcPs (LPat GhcPs)
</span><a href="#local-6989586621681128141"><span class="hs-identifier hs-var">rpats</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-532"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128140"><span class="annot"><span class="annottext">Located Name
</span><a href="#local-6989586621681128140"><span class="hs-identifier hs-var">con'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Located RdrName -&gt; CpsRn (Located Name)
</span><a href="GHC.Rename.Pat.html#lookupConCps"><span class="hs-identifier hs-var">lookupConCps</span></a></span><span> </span><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681128143"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-533"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128139"><span class="annot"><span class="annottext">HsRecFields (GhcPass 'Renamed) (Located (Pat (GhcPass 'Renamed)))
</span><a href="#local-6989586621681128139"><span class="hs-identifier hs-var">rpats'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker
-&gt; Located Name
-&gt; HsRecFields GhcPs (LPat GhcPs)
-&gt; CpsRn (HsRecFields (GhcPass 'Renamed) (LPat (GhcPass 'Renamed)))
</span><a href="GHC.Rename.Pat.html#rnHsRecPatsAndThen"><span class="hs-identifier hs-var">rnHsRecPatsAndThen</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128144"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">Located Name
</span><a href="#local-6989586621681128140"><span class="hs-identifier hs-var">con'</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecFields GhcPs (LPat GhcPs)
</span><a href="#local-6989586621681128141"><span class="hs-identifier hs-var">rpats</span></a></span><span>
</span><span id="line-534"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed)))
-&gt; Pat (GhcPass 'Renamed) -&gt; CpsRn (Pat (GhcPass 'Renamed))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConPat :: forall p.
XConPat p -&gt; Located (ConLikeP p) -&gt; HsConPatDetails p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-type">ConPat</span></a></span><span>
</span><span id="line-535"></span><span>            </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">pat_con_ext :: XConPat (GhcPass 'Renamed)
</span><a href="GHC.Hs.Pat.html#pat_con_ext"><span class="hs-identifier hs-var">pat_con_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NoExtField
XConPat (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span>
</span><span id="line-536"></span><span>            </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_con :: Located (ConLikeP (GhcPass 'Renamed))
</span><a href="GHC.Hs.Pat.html#pat_con"><span class="hs-identifier hs-var">pat_con</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Located Name
Located (ConLikeP (GhcPass 'Renamed))
</span><a href="#local-6989586621681128140"><span class="hs-identifier hs-var">con'</span></a></span><span>
</span><span id="line-537"></span><span>            </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_args :: HsConPatDetails (GhcPass 'Renamed)
</span><a href="GHC.Hs.Pat.html#pat_args"><span class="hs-identifier hs-var">pat_args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsRecFields (GhcPass 'Renamed) (Located (Pat (GhcPass 'Renamed)))
-&gt; HsConDetails
     (Located (Pat (GhcPass 'Renamed)))
     (HsRecFields (GhcPass 'Renamed) (Located (Pat (GhcPass 'Renamed))))
forall arg rec. rec -&gt; HsConDetails arg rec
</span><a href="GHC.Hs.Type.html#RecCon"><span class="hs-identifier hs-var">RecCon</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecFields (GhcPass 'Renamed) (Located (Pat (GhcPass 'Renamed)))
</span><a href="#local-6989586621681128139"><span class="hs-identifier hs-var">rpats'</span></a></span><span>
</span><span id="line-538"></span><span>            </span><span class="hs-special">}</span><span>
</span><span id="line-539"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-540"></span><span>
</span><span id="line-541"></span><span class="annot"><a href="GHC.Rename.Pat.html#checkUnusedRecordWildcardCps"><span class="hs-identifier hs-type">checkUnusedRecordWildcardCps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-542"></span><span id="checkUnusedRecordWildcardCps"><span class="annot"><span class="annottext">checkUnusedRecordWildcardCps :: SrcSpan -&gt; Maybe [Name] -&gt; CpsRn ()
</span><a href="GHC.Rename.Pat.html#checkUnusedRecordWildcardCps"><span class="hs-identifier hs-var hs-var">checkUnusedRecordWildcardCps</span></a></span></span><span> </span><span id="local-6989586621681128136"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128136"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681128135"><span class="annot"><span class="annottext">Maybe [Name]
</span><a href="#local-6989586621681128135"><span class="hs-identifier hs-var">dotdot_names</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-543"></span><span>  </span><span class="annot"><span class="annottext">(forall r. (() -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn ()
forall b.
(forall r. (b -&gt; RnM (r, FreeVars)) -&gt; RnM (r, FreeVars))
-&gt; CpsRn b
</span><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-var">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681128131"><span class="annot"><span class="annottext">() -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128131"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-544"></span><span>                    </span><span class="hs-special">(</span><span id="local-6989586621681128130"><span class="annot"><span class="annottext">r
</span><a href="#local-6989586621681128130"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681128129"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681128129"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">() -&gt; RnM (r, FreeVars)
</span><a href="#local-6989586621681128131"><span class="hs-identifier hs-var">thing</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-545"></span><span>                    </span><span class="annot"><span class="annottext">SrcSpan
-&gt; FreeVars -&gt; Maybe [Name] -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Rename.Utils.html#checkUnusedRecordWildcard"><span class="hs-identifier hs-var">checkUnusedRecordWildcard</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128136"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681128129"><span class="hs-identifier hs-var">fvs</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [Name]
</span><a href="#local-6989586621681128135"><span class="hs-identifier hs-var">dotdot_names</span></a></span><span>
</span><span id="line-546"></span><span>                    </span><span class="annot"><span class="annottext">(r, FreeVars) -&gt; RnM (r, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">r
</span><a href="#local-6989586621681128130"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681128129"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-547"></span><span class="hs-comment">--------------------</span><span>
</span><span id="line-548"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnHsRecPatsAndThen"><span class="hs-identifier hs-type">rnHsRecPatsAndThen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#NameMaker"><span class="hs-identifier hs-type">NameMaker</span></a></span><span>
</span><span id="line-549"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>      </span><span class="hs-comment">-- Constructor</span><span>
</span><span id="line-550"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecFields"><span class="hs-identifier hs-type">HsRecFields</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-551"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#CpsRn"><span class="hs-identifier hs-type">CpsRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecFields"><span class="hs-identifier hs-type">HsRecFields</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-552"></span><span id="rnHsRecPatsAndThen"><span class="annot"><span class="annottext">rnHsRecPatsAndThen :: NameMaker
-&gt; Located Name
-&gt; HsRecFields GhcPs (LPat GhcPs)
-&gt; CpsRn (HsRecFields (GhcPass 'Renamed) (LPat (GhcPass 'Renamed)))
</span><a href="GHC.Rename.Pat.html#rnHsRecPatsAndThen"><span class="hs-identifier hs-var hs-var">rnHsRecPatsAndThen</span></a></span></span><span> </span><span id="local-6989586621681128128"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128128"><span class="hs-identifier hs-var">mk</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128127"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128127"><span class="hs-identifier hs-var">con</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-553"></span><span>     </span><span id="local-6989586621681128126"><span class="annot"><span class="annottext">hs_rec_fields :: HsRecFields GhcPs (LPat GhcPs)
</span><a href="#local-6989586621681128126"><span class="hs-identifier hs-var">hs_rec_fields</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecFields"><span class="hs-identifier hs-type">HsRecFields</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">rec_dotdot :: forall p arg. HsRecFields p arg -&gt; Maybe (Located Int)
</span><a href="GHC.Hs.Pat.html#rec_dotdot"><span class="hs-identifier hs-var">rec_dotdot</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681128123"><span class="annot"><span class="annottext">Maybe (Located Int)
</span><a href="#local-6989586621681128123"><span class="hs-identifier hs-var">dd</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-554"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128122"><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located (Pat GhcPs))]
</span><a href="#local-6989586621681128122"><span class="hs-identifier hs-var">flds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnM
  ([LHsRecField (GhcPass 'Renamed) (Located (Pat GhcPs))], FreeVars)
-&gt; CpsRn [LHsRecField (GhcPass 'Renamed) (Located (Pat GhcPs))]
forall a. RnM (a, FreeVars) -&gt; CpsRn a
</span><a href="GHC.Rename.Pat.html#liftCpsFV"><span class="hs-identifier hs-var">liftCpsFV</span></a></span><span> </span><span class="annot"><span class="annottext">(RnM
   ([LHsRecField (GhcPass 'Renamed) (Located (Pat GhcPs))], FreeVars)
 -&gt; CpsRn [LHsRecField (GhcPass 'Renamed) (Located (Pat GhcPs))])
-&gt; RnM
     ([LHsRecField (GhcPass 'Renamed) (Located (Pat GhcPs))], FreeVars)
-&gt; CpsRn [LHsRecField (GhcPass 'Renamed) (Located (Pat GhcPs))]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecFieldContext
-&gt; (SrcSpan -&gt; RdrName -&gt; Pat GhcPs)
-&gt; HsRecFields GhcPs (Located (Pat GhcPs))
-&gt; RnM
     ([LHsRecField (GhcPass 'Renamed) (Located (Pat GhcPs))], FreeVars)
forall arg.
HsRecFieldContext
-&gt; (SrcSpan -&gt; RdrName -&gt; arg)
-&gt; HsRecFields GhcPs (Located arg)
-&gt; RnM ([LHsRecField (GhcPass 'Renamed) (Located arg)], FreeVars)
</span><a href="GHC.Rename.Pat.html#rnHsRecFields"><span class="hs-identifier hs-var">rnHsRecFields</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; HsRecFieldContext
</span><a href="GHC.Rename.Pat.html#HsRecFieldPat"><span class="hs-identifier hs-var">HsRecFieldPat</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128127"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; RdrName -&gt; Pat GhcPs
forall {p}. (XVarPat p ~ NoExtField) =&gt; SrcSpan -&gt; IdP p -&gt; Pat p
</span><a href="#local-6989586621681128120"><span class="hs-identifier hs-var">mkVarPat</span></a></span><span>
</span><span id="line-555"></span><span>                                            </span><span class="annot"><span class="annottext">HsRecFields GhcPs (Located (Pat GhcPs))
HsRecFields GhcPs (LPat GhcPs)
</span><a href="#local-6989586621681128126"><span class="hs-identifier hs-var">hs_rec_fields</span></a></span><span>
</span><span id="line-556"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128119"><span class="annot"><span class="annottext">[GenLocated
   SrcSpan
   (HsRecField'
      (FieldOcc (GhcPass 'Renamed)) (Located (Pat (GhcPass 'Renamed))))]
</span><a href="#local-6989586621681128119"><span class="hs-identifier hs-var">flds'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">((LHsRecField (GhcPass 'Renamed) (Located (Pat GhcPs)), Int)
 -&gt; CpsRn
      (GenLocated
         SrcSpan
         (HsRecField'
            (FieldOcc (GhcPass 'Renamed)) (Located (Pat (GhcPass 'Renamed))))))
-&gt; [(LHsRecField (GhcPass 'Renamed) (Located (Pat GhcPs)), Int)]
-&gt; CpsRn
     [GenLocated
        SrcSpan
        (HsRecField'
           (FieldOcc (GhcPass 'Renamed)) (Located (Pat (GhcPass 'Renamed))))]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">(LHsRecField (GhcPass 'Renamed) (Located (Pat GhcPs)), Int)
-&gt; CpsRn
     (GenLocated
        SrcSpan
        (HsRecField'
           (FieldOcc (GhcPass 'Renamed)) (Located (Pat (GhcPass 'Renamed)))))
</span><a href="#local-6989586621681128118"><span class="hs-identifier hs-var">rn_field</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located (Pat GhcPs))]
</span><a href="#local-6989586621681128122"><span class="hs-identifier hs-var">flds</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located (Pat GhcPs))]
-&gt; [Int]
-&gt; [(LHsRecField (GhcPass 'Renamed) (Located (Pat GhcPs)), Int)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-operator hs-var">`zip`</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-glyph">..</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-557"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Maybe [Name] -&gt; CpsRn ()
</span><a href="#local-6989586621681128117"><span class="hs-identifier hs-var">check_unused_wildcard</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[GenLocated
   SrcSpan
   (HsRecField'
      (FieldOcc (GhcPass 'Renamed)) (LPat (GhcPass 'Renamed)))]
-&gt; Located Int -&gt; [IdP (GhcPass 'Renamed)]
forall {p} {l} {id} {l}.
CollectPass p =&gt;
[GenLocated l (HsRecField' id (XRec p Pat))]
-&gt; GenLocated l Int -&gt; [IdP p]
</span><a href="#local-6989586621681128116"><span class="hs-identifier hs-var">implicit_binders</span></a></span><span> </span><span class="annot"><span class="annottext">[GenLocated
   SrcSpan
   (HsRecField'
      (FieldOcc (GhcPass 'Renamed)) (Located (Pat (GhcPass 'Renamed))))]
[GenLocated
   SrcSpan
   (HsRecField'
      (FieldOcc (GhcPass 'Renamed)) (LPat (GhcPass 'Renamed)))]
</span><a href="#local-6989586621681128119"><span class="hs-identifier hs-var">flds'</span></a></span><span> </span><span class="annot"><span class="annottext">(Located Int -&gt; [Name]) -&gt; Maybe (Located Int) -&gt; Maybe [Name]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Located Int)
</span><a href="#local-6989586621681128123"><span class="hs-identifier hs-var">dd</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-558"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">HsRecFields (GhcPass 'Renamed) (Located (Pat (GhcPass 'Renamed)))
-&gt; CpsRn
     (HsRecFields (GhcPass 'Renamed) (Located (Pat (GhcPass 'Renamed))))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsRecFields :: forall p arg.
[LHsRecField p arg] -&gt; Maybe (Located Int) -&gt; HsRecFields p arg
</span><a href="GHC.Hs.Pat.html#HsRecFields"><span class="hs-identifier hs-type">HsRecFields</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">rec_flds :: [GenLocated
   SrcSpan
   (HsRecField'
      (FieldOcc (GhcPass 'Renamed)) (Located (Pat (GhcPass 'Renamed))))]
</span><a href="GHC.Hs.Pat.html#rec_flds"><span class="hs-identifier hs-var">rec_flds</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[GenLocated
   SrcSpan
   (HsRecField'
      (FieldOcc (GhcPass 'Renamed)) (Located (Pat (GhcPass 'Renamed))))]
</span><a href="#local-6989586621681128119"><span class="hs-identifier hs-var">flds'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rec_dotdot :: Maybe (Located Int)
</span><a href="GHC.Hs.Pat.html#rec_dotdot"><span class="hs-identifier hs-var">rec_dotdot</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (Located Int)
</span><a href="#local-6989586621681128123"><span class="hs-identifier hs-var">dd</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-559"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-560"></span><span>    </span><span id="local-6989586621681128120"><span class="annot"><span class="annottext">mkVarPat :: SrcSpan -&gt; IdP p -&gt; Pat p
</span><a href="#local-6989586621681128120"><span class="hs-identifier hs-var hs-var">mkVarPat</span></a></span></span><span> </span><span id="local-6989586621681128110"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128110"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621681128109"><span class="annot"><span class="annottext">IdP p
</span><a href="#local-6989586621681128109"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">XVarPat p -&gt; Located (IdP p) -&gt; Pat p
forall p. XVarPat p -&gt; Located (IdP p) -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#VarPat"><span class="hs-identifier hs-var">VarPat</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XVarPat p
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; IdP p -&gt; Located (IdP p)
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128110"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">IdP p
</span><a href="#local-6989586621681128109"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-561"></span><span>    </span><span id="local-6989586621681128118"><span class="annot"><span class="annottext">rn_field :: (LHsRecField (GhcPass 'Renamed) (Located (Pat GhcPs)), Int)
-&gt; CpsRn
     (GenLocated
        SrcSpan
        (HsRecField'
           (FieldOcc (GhcPass 'Renamed)) (Located (Pat (GhcPass 'Renamed)))))
</span><a href="#local-6989586621681128118"><span class="hs-identifier hs-var hs-var">rn_field</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681128108"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128108"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621681128107"><span class="annot"><span class="annottext">HsRecField' (FieldOcc (GhcPass 'Renamed)) (Located (Pat GhcPs))
</span><a href="#local-6989586621681128107"><span class="hs-identifier hs-var">fld</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681128106"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681128106"><span class="hs-identifier hs-var">n'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-562"></span><span>      </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128105"><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128105"><span class="hs-identifier hs-var">arg'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NameMaker -&gt; LPat GhcPs -&gt; CpsRn (LPat (GhcPass 'Renamed))
</span><a href="GHC.Rename.Pat.html#rnLPatAndThen"><span class="hs-identifier hs-var">rnLPatAndThen</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe (Located Int) -&gt; NameMaker -&gt; Int -&gt; NameMaker
forall {a} {l}.
Ord a =&gt;
Maybe (GenLocated l a) -&gt; NameMaker -&gt; a -&gt; NameMaker
</span><a href="#local-6989586621681128104"><span class="hs-identifier hs-var">nested_mk</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Located Int)
</span><a href="#local-6989586621681128123"><span class="hs-identifier hs-var">dd</span></a></span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128128"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681128106"><span class="hs-identifier hs-var">n'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsRecField' (FieldOcc (GhcPass 'Renamed)) (Located (Pat GhcPs))
-&gt; Located (Pat GhcPs)
forall id arg. HsRecField' id arg -&gt; arg
</span><a href="GHC.Hs.Pat.html#hsRecFieldArg"><span class="hs-identifier hs-var hs-var">hsRecFieldArg</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecField' (FieldOcc (GhcPass 'Renamed)) (Located (Pat GhcPs))
</span><a href="#local-6989586621681128107"><span class="hs-identifier hs-var">fld</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-563"></span><span>         </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">GenLocated
  SrcSpan
  (HsRecField'
     (FieldOcc (GhcPass 'Renamed)) (Located (Pat (GhcPass 'Renamed))))
-&gt; CpsRn
     (GenLocated
        SrcSpan
        (HsRecField'
           (FieldOcc (GhcPass 'Renamed)) (Located (Pat (GhcPass 'Renamed)))))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan
-&gt; HsRecField'
     (FieldOcc (GhcPass 'Renamed)) (Located (Pat (GhcPass 'Renamed)))
-&gt; GenLocated
     SrcSpan
     (HsRecField'
        (FieldOcc (GhcPass 'Renamed)) (Located (Pat (GhcPass 'Renamed))))
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128108"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsRecField' (FieldOcc (GhcPass 'Renamed)) (Located (Pat GhcPs))
</span><a href="#local-6989586621681128107"><span class="hs-identifier hs-var">fld</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsRecFieldArg :: Located (Pat (GhcPass 'Renamed))
</span><a href="GHC.Hs.Pat.html#hsRecFieldArg"><span class="hs-identifier hs-var">hsRecFieldArg</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Located (Pat (GhcPass 'Renamed))
</span><a href="#local-6989586621681128105"><span class="hs-identifier hs-var">arg'</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-564"></span><span>
</span><span id="line-565"></span><span>    </span><span id="local-6989586621681128102"><span class="annot"><span class="annottext">loc :: SrcSpan
</span><a href="#local-6989586621681128102"><span class="hs-identifier hs-var hs-var">loc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan
-&gt; (Located Int -&gt; SrcSpan) -&gt; Maybe (Located Int) -&gt; SrcSpan
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="GHC.Types.SrcLoc.html#noSrcSpan"><span class="hs-identifier hs-var">noSrcSpan</span></a></span><span> </span><span class="annot"><span class="annottext">Located Int -&gt; SrcSpan
forall l e. GenLocated l e -&gt; l
</span><a href="GHC.Types.SrcLoc.html#getLoc"><span class="hs-identifier hs-var">getLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Located Int)
</span><a href="#local-6989586621681128123"><span class="hs-identifier hs-var">dd</span></a></span><span>
</span><span id="line-566"></span><span>
</span><span id="line-567"></span><span>    </span><span class="hs-comment">-- Get the arguments of the implicit binders</span><span>
</span><span id="line-568"></span><span>    </span><span id="local-6989586621681128116"><span class="annot"><span class="annottext">implicit_binders :: [GenLocated l (HsRecField' id (XRec p Pat))]
-&gt; GenLocated l Int -&gt; [IdP p]
</span><a href="#local-6989586621681128116"><span class="hs-identifier hs-var hs-var">implicit_binders</span></a></span></span><span> </span><span id="local-6989586621681128096"><span class="annot"><span class="annottext">[GenLocated l (HsRecField' id (XRec p Pat))]
</span><a href="#local-6989586621681128096"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated l Int -&gt; Int
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span id="local-6989586621681128095"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681128095"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[XRec p Pat] -&gt; [IdP p]
forall p. CollectPass p =&gt; [LPat p] -&gt; [IdP p]
</span><a href="GHC.Hs.Utils.html#collectPatsBinders"><span class="hs-identifier hs-var">collectPatsBinders</span></a></span><span> </span><span class="annot"><span class="annottext">[XRec p Pat]
</span><a href="#local-6989586621681128094"><span class="hs-identifier hs-var">implicit_pats</span></a></span><span>
</span><span id="line-569"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-570"></span><span>        </span><span id="local-6989586621681128094"><span class="annot"><span class="annottext">implicit_pats :: [XRec p Pat]
</span><a href="#local-6989586621681128094"><span class="hs-identifier hs-var hs-var">implicit_pats</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(GenLocated l (HsRecField' id (XRec p Pat)) -&gt; XRec p Pat)
-&gt; [GenLocated l (HsRecField' id (XRec p Pat))] -&gt; [XRec p Pat]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsRecField' id (XRec p Pat) -&gt; XRec p Pat
forall id arg. HsRecField' id arg -&gt; arg
</span><a href="GHC.Hs.Pat.html#hsRecFieldArg"><span class="hs-identifier hs-var hs-var">hsRecFieldArg</span></a></span><span> </span><span class="annot"><span class="annottext">(HsRecField' id (XRec p Pat) -&gt; XRec p Pat)
-&gt; (GenLocated l (HsRecField' id (XRec p Pat))
    -&gt; HsRecField' id (XRec p Pat))
-&gt; GenLocated l (HsRecField' id (XRec p Pat))
-&gt; XRec p Pat
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated l (HsRecField' id (XRec p Pat))
-&gt; HsRecField' id (XRec p Pat)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
-&gt; [GenLocated l (HsRecField' id (XRec p Pat))]
-&gt; [GenLocated l (HsRecField' id (XRec p Pat))]
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#drop"><span class="hs-identifier hs-var">drop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681128095"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">[GenLocated l (HsRecField' id (XRec p Pat))]
</span><a href="#local-6989586621681128096"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-571"></span><span>
</span><span id="line-572"></span><span>    </span><span class="hs-comment">-- Don't warn for let P{..} = ... in ...</span><span>
</span><span id="line-573"></span><span>    </span><span id="local-6989586621681128117"><span class="annot"><span class="annottext">check_unused_wildcard :: Maybe [Name] -&gt; CpsRn ()
</span><a href="#local-6989586621681128117"><span class="hs-identifier hs-var hs-var">check_unused_wildcard</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128128"><span class="hs-identifier hs-var">mk</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-574"></span><span>                              </span><span class="annot"><a href="GHC.Rename.Pat.html#LetMk"><span class="hs-identifier hs-type">LetMk</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CpsRn () -&gt; Maybe [Name] -&gt; CpsRn ()
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">() -&gt; CpsRn ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-575"></span><span>                              </span><span class="annot"><a href="GHC.Rename.Pat.html#LamMk"><span class="hs-identifier hs-type">LamMk</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; Maybe [Name] -&gt; CpsRn ()
</span><a href="GHC.Rename.Pat.html#checkUnusedRecordWildcardCps"><span class="hs-identifier hs-var">checkUnusedRecordWildcardCps</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128102"><span class="hs-identifier hs-var">loc</span></a></span><span>
</span><span id="line-576"></span><span>
</span><span id="line-577"></span><span>        </span><span class="hs-comment">-- Suppress unused-match reporting for fields introduced by &quot;..&quot;</span><span>
</span><span id="line-578"></span><span>    </span><span id="local-6989586621681128104"><span class="annot"><span class="annottext">nested_mk :: Maybe (GenLocated l a) -&gt; NameMaker -&gt; a -&gt; NameMaker
</span><a href="#local-6989586621681128104"><span class="hs-identifier hs-var hs-var">nested_mk</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe (GenLocated l a)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span id="local-6989586621681128089"><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128089"><span class="hs-identifier hs-var">mk</span></a></span></span><span>                    </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128089"><span class="hs-identifier hs-var">mk</span></a></span><span>
</span><span id="line-579"></span><span>    </span><span class="annot"><a href="#local-6989586621681128104"><span class="hs-identifier hs-var">nested_mk</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated l a
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681128088"><span class="annot"><span class="annottext">mk :: NameMaker
</span><a href="#local-6989586621681128088"><span class="hs-identifier hs-var">mk</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.Pat.html#LetMk"><span class="hs-identifier hs-type">LetMk</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameMaker
</span><a href="#local-6989586621681128088"><span class="hs-identifier hs-var">mk</span></a></span><span>
</span><span id="line-580"></span><span>    </span><span class="annot"><a href="#local-6989586621681128104"><span class="hs-identifier hs-var">nested_mk</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated l a -&gt; a
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span id="local-6989586621681128087"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681128087"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.Pat.html#LamMk"><span class="hs-identifier hs-type">LamMk</span></a></span><span> </span><span id="local-6989586621681128086"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128086"><span class="hs-identifier hs-var">report_unused</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681128085"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681128085"><span class="hs-identifier hs-var">n'</span></a></span></span><span>
</span><span id="line-581"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; NameMaker
</span><a href="GHC.Rename.Pat.html#LamMk"><span class="hs-identifier hs-var">LamMk</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128086"><span class="hs-identifier hs-var">report_unused</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681128085"><span class="hs-identifier hs-var">n'</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681128087"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-582"></span><span>
</span><span id="line-583"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
        Record fields
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-590"></span><span>
</span><span id="line-591"></span><span class="hs-keyword">data</span><span> </span><span id="HsRecFieldContext"><span class="annot"><a href="GHC.Rename.Pat.html#HsRecFieldContext"><span class="hs-identifier hs-var">HsRecFieldContext</span></a></span></span><span>
</span><span id="line-592"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="HsRecFieldCon"><span class="annot"><a href="GHC.Rename.Pat.html#HsRecFieldCon"><span class="hs-identifier hs-var">HsRecFieldCon</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-593"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="HsRecFieldPat"><span class="annot"><a href="GHC.Rename.Pat.html#HsRecFieldPat"><span class="hs-identifier hs-var">HsRecFieldPat</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-594"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="HsRecFieldUpd"><span class="annot"><a href="GHC.Rename.Pat.html#HsRecFieldUpd"><span class="hs-identifier hs-var">HsRecFieldUpd</span></a></span></span><span>
</span><span id="line-595"></span><span>
</span><span id="line-596"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnHsRecFields"><span class="hs-identifier hs-type">rnHsRecFields</span></a></span><span>
</span><span id="line-597"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621681128739"><span class="annot"><a href="#local-6989586621681128739"><span class="hs-identifier hs-type">arg</span></a></span></span><span class="hs-operator">.</span><span>
</span><span id="line-598"></span><span>       </span><span class="annot"><a href="GHC.Rename.Pat.html#HsRecFieldContext"><span class="hs-identifier hs-type">HsRecFieldContext</span></a></span><span>
</span><span id="line-599"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681128739"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-600"></span><span>         </span><span class="hs-comment">-- When punning, use this to build a new field</span><span>
</span><span id="line-601"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecFields"><span class="hs-identifier hs-type">HsRecFields</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128739"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-602"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecField"><span class="hs-identifier hs-type">LHsRecField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128739"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-603"></span><span>
</span><span id="line-604"></span><span class="hs-comment">-- This surprisingly complicated pass</span><span>
</span><span id="line-605"></span><span class="hs-comment">--   a) looks up the field name (possibly using disambiguation)</span><span>
</span><span id="line-606"></span><span class="hs-comment">--   b) fills in puns and dot-dot stuff</span><span>
</span><span id="line-607"></span><span class="hs-comment">-- When we've finished, we've renamed the LHS, but not the RHS,</span><span>
</span><span id="line-608"></span><span class="hs-comment">-- of each x=e binding</span><span>
</span><span id="line-609"></span><span class="hs-comment">--</span><span>
</span><span id="line-610"></span><span class="hs-comment">-- This is used for record construction and pattern-matching, but not updates.</span><span>
</span><span id="line-611"></span><span>
</span><span id="line-612"></span><span id="rnHsRecFields"><span class="annot"><span class="annottext">rnHsRecFields :: forall arg.
HsRecFieldContext
-&gt; (SrcSpan -&gt; RdrName -&gt; arg)
-&gt; HsRecFields GhcPs (Located arg)
-&gt; RnM ([LHsRecField (GhcPass 'Renamed) (Located arg)], FreeVars)
</span><a href="GHC.Rename.Pat.html#rnHsRecFields"><span class="hs-identifier hs-var hs-var">rnHsRecFields</span></a></span></span><span> </span><span id="local-6989586621681128048"><span class="annot"><span class="annottext">HsRecFieldContext
</span><a href="#local-6989586621681128048"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span id="local-6989586621681128047"><span class="annot"><span class="annottext">SrcSpan -&gt; RdrName -&gt; arg
</span><a href="#local-6989586621681128047"><span class="hs-identifier hs-var">mk_arg</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecFields"><span class="hs-identifier hs-type">HsRecFields</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">rec_flds :: forall p arg. HsRecFields p arg -&gt; [LHsRecField p arg]
</span><a href="GHC.Hs.Pat.html#rec_flds"><span class="hs-identifier hs-var">rec_flds</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681128046"><span class="annot"><span class="annottext">[LHsRecField GhcPs (Located arg)]
</span><a href="#local-6989586621681128046"><span class="hs-identifier hs-var">flds</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rec_dotdot :: forall p arg. HsRecFields p arg -&gt; Maybe (Located Int)
</span><a href="GHC.Hs.Pat.html#rec_dotdot"><span class="hs-identifier hs-var">rec_dotdot</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681128045"><span class="annot"><span class="annottext">Maybe (Located Int)
</span><a href="#local-6989586621681128045"><span class="hs-identifier hs-var">dotdot</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-613"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128044"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128044"><span class="hs-identifier hs-var">pun_ok</span></a></span></span><span>      </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; RnM Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#RecordPuns"><span class="hs-identifier hs-var">LangExt.RecordPuns</span></a></span><span>
</span><span id="line-614"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128042"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128042"><span class="hs-identifier hs-var">disambig_ok</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; RnM Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#DisambiguateRecordFields"><span class="hs-identifier hs-var">LangExt.DisambiguateRecordFields</span></a></span><span>
</span><span id="line-615"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681128040"><span class="annot"><span class="annottext">parent :: Maybe Name
</span><a href="#local-6989586621681128040"><span class="hs-identifier hs-var hs-var">parent</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Maybe ()
forall (f :: * -&gt; *). Alternative f =&gt; Bool -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#guard"><span class="hs-identifier hs-var">guard</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128042"><span class="hs-identifier hs-var">disambig_ok</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe () -&gt; Maybe Name -&gt; Maybe Name
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Name
</span><a href="#local-6989586621681128039"><span class="hs-identifier hs-var">mb_con</span></a></span><span>
</span><span id="line-616"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128038"><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)]
</span><a href="#local-6989586621681128038"><span class="hs-identifier hs-var">flds1</span></a></span></span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(LHsRecField GhcPs (Located arg)
 -&gt; IOEnv
      (Env TcGblEnv TcLclEnv)
      (LHsRecField (GhcPass 'Renamed) (Located arg)))
-&gt; [LHsRecField GhcPs (Located arg)]
-&gt; IOEnv
     (Env TcGblEnv TcLclEnv)
     [LHsRecField (GhcPass 'Renamed) (Located arg)]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
-&gt; Maybe Name
-&gt; LHsRecField GhcPs (Located arg)
-&gt; IOEnv
     (Env TcGblEnv TcLclEnv)
     (LHsRecField (GhcPass 'Renamed) (Located arg))
</span><a href="#local-6989586621681128037"><span class="hs-identifier hs-var">rn_fld</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128044"><span class="hs-identifier hs-var">pun_ok</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Name
</span><a href="#local-6989586621681128040"><span class="hs-identifier hs-var">parent</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LHsRecField GhcPs (Located arg)]
</span><a href="#local-6989586621681128046"><span class="hs-identifier hs-var">flds</span></a></span><span>
</span><span id="line-617"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(NonEmpty RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) ())
-&gt; [NonEmpty RdrName] -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; IOEnv (Env TcGblEnv TcLclEnv) ())
-&gt; (NonEmpty RdrName -&gt; MsgDoc)
-&gt; NonEmpty RdrName
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecFieldContext -&gt; NonEmpty RdrName -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#dupFieldErr"><span class="hs-identifier hs-var">dupFieldErr</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecFieldContext
</span><a href="#local-6989586621681128048"><span class="hs-identifier hs-var">ctxt</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[NonEmpty RdrName]
</span><a href="#local-6989586621681128033"><span class="hs-identifier hs-var">dup_flds</span></a></span><span>
</span><span id="line-618"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128032"><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)]
</span><a href="#local-6989586621681128032"><span class="hs-identifier hs-var">dotdot_flds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Maybe (Located Int)
-&gt; Maybe Name
-&gt; [LHsRecField (GhcPass 'Renamed) (Located arg)]
-&gt; IOEnv
     (Env TcGblEnv TcLclEnv)
     [LHsRecField (GhcPass 'Renamed) (Located arg)]
</span><a href="#local-6989586621681128031"><span class="hs-identifier hs-var">rn_dotdot</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Located Int)
</span><a href="#local-6989586621681128045"><span class="hs-identifier hs-var">dotdot</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Name
</span><a href="#local-6989586621681128039"><span class="hs-identifier hs-var">mb_con</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)]
</span><a href="#local-6989586621681128038"><span class="hs-identifier hs-var">flds1</span></a></span><span>
</span><span id="line-619"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681128030"><span class="annot"><span class="annottext">all_flds :: [LHsRecField (GhcPass 'Renamed) (Located arg)]
</span><a href="#local-6989586621681128030"><span class="hs-identifier hs-var hs-var">all_flds</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)]
</span><a href="#local-6989586621681128032"><span class="hs-identifier hs-var">dotdot_flds</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)]
</span><a href="#local-6989586621681128038"><span class="hs-identifier hs-var">flds1</span></a></span><span>
</span><span id="line-620"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)]
</span><a href="#local-6989586621681128038"><span class="hs-identifier hs-var">flds1</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)]
-&gt; [LHsRecField (GhcPass 'Renamed) (Located arg)]
-&gt; [LHsRecField (GhcPass 'Renamed) (Located arg)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)]
</span><a href="#local-6989586621681128032"><span class="hs-identifier hs-var">dotdot_flds</span></a></span><span>
</span><span id="line-621"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">([LHsRecField (GhcPass 'Renamed) (Located arg)], FreeVars)
-&gt; RnM ([LHsRecField (GhcPass 'Renamed) (Located arg)], FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)]
</span><a href="#local-6989586621681128030"><span class="hs-identifier hs-var">all_flds</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#mkFVs"><span class="hs-identifier hs-var">mkFVs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)] -&gt; [Name]
forall arg. [LHsRecField (GhcPass 'Renamed) arg] -&gt; [Name]
</span><a href="GHC.Rename.Pat.html#getFieldIds"><span class="hs-identifier hs-var">getFieldIds</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)]
</span><a href="#local-6989586621681128030"><span class="hs-identifier hs-var">all_flds</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-622"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-623"></span><span>    </span><span id="local-6989586621681128039"><span class="annot"><span class="annottext">mb_con :: Maybe Name
</span><a href="#local-6989586621681128039"><span class="hs-identifier hs-var hs-var">mb_con</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HsRecFieldContext
</span><a href="#local-6989586621681128048"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-624"></span><span>                </span><span class="annot"><a href="GHC.Rename.Pat.html#HsRecFieldCon"><span class="hs-identifier hs-type">HsRecFieldCon</span></a></span><span> </span><span id="local-6989586621681128026"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128026"><span class="hs-identifier hs-var">con</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Maybe Name
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128026"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-625"></span><span>                </span><span class="annot"><a href="GHC.Rename.Pat.html#HsRecFieldPat"><span class="hs-identifier hs-type">HsRecFieldPat</span></a></span><span> </span><span id="local-6989586621681128025"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128025"><span class="hs-identifier hs-var">con</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Maybe Name
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128025"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-626"></span><span>                </span><span class="annot"><span class="annottext">HsRecFieldContext
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-comment">{- update -}</span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe Name
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-627"></span><span>
</span><span id="line-628"></span><span>    </span><span class="annot"><a href="#local-6989586621681128037"><span class="hs-identifier hs-type">rn_fld</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecField"><span class="hs-identifier hs-type">LHsRecField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128739"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-629"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecField"><span class="hs-identifier hs-type">LHsRecField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128739"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-630"></span><span>    </span><span id="local-6989586621681128037"><span class="annot"><span class="annottext">rn_fld :: Bool
-&gt; Maybe Name
-&gt; LHsRecField GhcPs (Located arg)
-&gt; IOEnv
     (Env TcGblEnv TcLclEnv)
     (LHsRecField (GhcPass 'Renamed) (Located arg))
</span><a href="#local-6989586621681128037"><span class="hs-identifier hs-var hs-var">rn_fld</span></a></span></span><span> </span><span id="local-6989586621681128024"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128024"><span class="hs-identifier hs-var">pun_ok</span></a></span></span><span> </span><span id="local-6989586621681128023"><span class="annot"><span class="annottext">Maybe Name
</span><a href="#local-6989586621681128023"><span class="hs-identifier hs-var">parent</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681128022"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128022"><span class="hs-identifier hs-var">l</span></a></span></span><span>
</span><span id="line-631"></span><span>                           </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField"><span class="hs-identifier hs-type">HsRecField</span></a></span><span>
</span><span id="line-632"></span><span>                              </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsRecFieldLbl :: forall id arg. HsRecField' id arg -&gt; Located id
</span><a href="GHC.Hs.Pat.html#hsRecFieldLbl"><span class="hs-identifier hs-var">hsRecFieldLbl</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-633"></span><span>                                  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681128019"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128019"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#FieldOcc"><span class="hs-identifier hs-type">FieldOcc</span></a></span><span> </span><span class="annot"><span class="annottext">XCFieldOcc GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681128017"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128017"><span class="hs-identifier hs-var">ll</span></a></span></span><span> </span><span id="local-6989586621681128016"><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681128016"><span class="hs-identifier hs-var">lbl</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-634"></span><span>                              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hsRecFieldArg :: forall id arg. HsRecField' id arg -&gt; arg
</span><a href="GHC.Hs.Pat.html#hsRecFieldArg"><span class="hs-identifier hs-var">hsRecFieldArg</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681128015"><span class="annot"><span class="annottext">Located arg
</span><a href="#local-6989586621681128015"><span class="hs-identifier hs-var">arg</span></a></span></span><span>
</span><span id="line-635"></span><span>                              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hsRecPun :: forall id arg. HsRecField' id arg -&gt; Bool
</span><a href="GHC.Hs.Pat.html#hsRecPun"><span class="hs-identifier hs-var">hsRecPun</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681128013"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128013"><span class="hs-identifier hs-var">pun</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-636"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681128012"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128012"><span class="hs-identifier hs-var">sel</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; RnM Name -&gt; RnM Name
forall a. SrcSpan -&gt; TcRn a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#setSrcSpan"><span class="hs-identifier hs-var">setSrcSpan</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128019"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">(RnM Name -&gt; RnM Name) -&gt; RnM Name -&gt; RnM Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Name -&gt; RdrName -&gt; RnM Name
</span><a href="GHC.Rename.Env.html#lookupRecFieldOcc"><span class="hs-identifier hs-var">lookupRecFieldOcc</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Name
</span><a href="#local-6989586621681128023"><span class="hs-identifier hs-var">parent</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681128016"><span class="hs-identifier hs-var">lbl</span></a></span><span>
</span><span id="line-637"></span><span>           </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681128010"><span class="annot"><span class="annottext">Located arg
</span><a href="#local-6989586621681128010"><span class="hs-identifier hs-var">arg'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128013"><span class="hs-identifier hs-var">pun</span></a></span><span>
</span><span id="line-638"></span><span>                     </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; MsgDoc -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Tc.Utils.Monad.html#checkErr"><span class="hs-identifier hs-var">checkErr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128024"><span class="hs-identifier hs-var">pun_ok</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located RdrName -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#badPun"><span class="hs-identifier hs-var">badPun</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; RdrName -&gt; Located RdrName
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128019"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681128016"><span class="hs-identifier hs-var">lbl</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-639"></span><span>                               </span><span class="hs-comment">-- Discard any module qualifier (#11662)</span><span>
</span><span id="line-640"></span><span>                             </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681128008"><span class="annot"><span class="annottext">arg_rdr :: RdrName
</span><a href="#local-6989586621681128008"><span class="hs-identifier hs-var hs-var">arg_rdr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; RdrName
</span><a href="GHC.Types.Name.Reader.html#mkRdrUnqual"><span class="hs-identifier hs-var">mkRdrUnqual</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RdrName -&gt; OccName
</span><a href="GHC.Types.Name.Reader.html#rdrNameOcc"><span class="hs-identifier hs-var">rdrNameOcc</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681128016"><span class="hs-identifier hs-var">lbl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-641"></span><span>                             </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Located arg -&gt; IOEnv (Env TcGblEnv TcLclEnv) (Located arg)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; arg -&gt; Located arg
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128019"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; RdrName -&gt; arg
</span><a href="#local-6989586621681128047"><span class="hs-identifier hs-var">mk_arg</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128019"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681128008"><span class="hs-identifier hs-var">arg_rdr</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-642"></span><span>                     </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Located arg -&gt; IOEnv (Env TcGblEnv TcLclEnv) (Located arg)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Located arg
</span><a href="#local-6989586621681128015"><span class="hs-identifier hs-var">arg</span></a></span><span>
</span><span id="line-643"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">LHsRecField (GhcPass 'Renamed) (Located arg)
-&gt; IOEnv
     (Env TcGblEnv TcLclEnv)
     (LHsRecField (GhcPass 'Renamed) (Located arg))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan
-&gt; HsRecField' (FieldOcc (GhcPass 'Renamed)) (Located arg)
-&gt; LHsRecField (GhcPass 'Renamed) (Located arg)
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128022"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsRecField :: forall id arg. Located id -&gt; arg -&gt; Bool -&gt; HsRecField' id arg
</span><a href="GHC.Hs.Pat.html#HsRecField"><span class="hs-identifier hs-type">HsRecField</span></a></span><span>
</span><span id="line-644"></span><span>                             </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsRecFieldLbl :: Located (FieldOcc (GhcPass 'Renamed))
</span><a href="GHC.Hs.Pat.html#hsRecFieldLbl"><span class="hs-identifier hs-var">hsRecFieldLbl</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan
-&gt; FieldOcc (GhcPass 'Renamed)
-&gt; Located (FieldOcc (GhcPass 'Renamed))
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128019"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XCFieldOcc (GhcPass 'Renamed)
-&gt; Located RdrName -&gt; FieldOcc (GhcPass 'Renamed)
forall pass. XCFieldOcc pass -&gt; Located RdrName -&gt; FieldOcc pass
</span><a href="GHC.Hs.Type.html#FieldOcc"><span class="hs-identifier hs-var">FieldOcc</span></a></span><span>
</span><span id="line-645"></span><span>                                                          </span><span class="annot"><span class="annottext">Name
XCFieldOcc (GhcPass 'Renamed)
</span><a href="#local-6989586621681128012"><span class="hs-identifier hs-var">sel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; RdrName -&gt; Located RdrName
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128017"><span class="hs-identifier hs-var">ll</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681128016"><span class="hs-identifier hs-var">lbl</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-646"></span><span>                             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hsRecFieldArg :: Located arg
</span><a href="GHC.Hs.Pat.html#hsRecFieldArg"><span class="hs-identifier hs-var">hsRecFieldArg</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Located arg
</span><a href="#local-6989586621681128010"><span class="hs-identifier hs-var">arg'</span></a></span><span>
</span><span id="line-647"></span><span>                             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hsRecPun :: Bool
</span><a href="GHC.Hs.Pat.html#hsRecPun"><span class="hs-identifier hs-var">hsRecPun</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681128013"><span class="hs-identifier hs-var">pun</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-648"></span><span>
</span><span id="line-649"></span><span>
</span><span id="line-650"></span><span>    </span><span class="annot"><a href="#local-6989586621681128031"><span class="hs-identifier hs-type">rn_dotdot</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>      </span><span class="hs-comment">-- See Note [DotDot fields] in GHC.Hs.Pat</span><span>
</span><span id="line-651"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-comment">-- The constructor (Nothing for an</span><span>
</span><span id="line-652"></span><span>                                </span><span class="hs-comment">--    out of scope constructor)</span><span>
</span><span id="line-653"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecField"><span class="hs-identifier hs-type">LHsRecField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128739"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- Explicit fields</span><span>
</span><span id="line-654"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecField"><span class="hs-identifier hs-type">LHsRecField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128739"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>   </span><span class="hs-comment">-- Field Labels we need to fill in</span><span>
</span><span id="line-655"></span><span>    </span><span id="local-6989586621681128031"><span class="annot"><span class="annottext">rn_dotdot :: Maybe (Located Int)
-&gt; Maybe Name
-&gt; [LHsRecField (GhcPass 'Renamed) (Located arg)]
-&gt; IOEnv
     (Env TcGblEnv TcLclEnv)
     [LHsRecField (GhcPass 'Renamed) (Located arg)]
</span><a href="#local-6989586621681128031"><span class="hs-identifier hs-var hs-var">rn_dotdot</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681128005"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128005"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681128004"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681128004"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681128003"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128003"><span class="hs-identifier hs-var">con</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681128002"><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)]
</span><a href="#local-6989586621681128002"><span class="hs-identifier hs-var">flds</span></a></span></span><span> </span><span class="hs-comment">-- &quot;..&quot; on record construction / pat match</span><span>
</span><span id="line-656"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="GHC.Builtin.Names.html#isUnboundName"><span class="hs-identifier hs-var">isUnboundName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128003"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- This test is because if the constructor</span><span>
</span><span id="line-657"></span><span>                                </span><span class="hs-comment">-- isn't in scope the constructor lookup will add</span><span>
</span><span id="line-658"></span><span>                                </span><span class="hs-comment">-- an error but still return an unbound name. We</span><span>
</span><span id="line-659"></span><span>                                </span><span class="hs-comment">-- don't want that to screw up the dot-dot fill-in stuff.</span><span>
</span><span id="line-660"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">flds</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">lengthIs</span><span class="hs-special">`</span><span> </span><span class="hs-identifier">n</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-661"></span><span>        </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681127996"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127996"><span class="hs-identifier hs-var">dd_flag</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; RnM Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#RecordWildCards"><span class="hs-identifier hs-var">LangExt.RecordWildCards</span></a></span><span>
</span><span id="line-662"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; MsgDoc -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Tc.Utils.Monad.html#checkErr"><span class="hs-identifier hs-var">checkErr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127996"><span class="hs-identifier hs-var">dd_flag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsRecFieldContext -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#needFlagDotDot"><span class="hs-identifier hs-var">needFlagDotDot</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecFieldContext
</span><a href="#local-6989586621681128048"><span class="hs-identifier hs-var">ctxt</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-663"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681127993"><span class="annot"><span class="annottext">GlobalRdrEnv
</span><a href="#local-6989586621681127993"><span class="hs-identifier hs-var">rdr_env</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681127992"><span class="annot"><span class="annottext">LocalRdrEnv
</span><a href="#local-6989586621681127992"><span class="hs-identifier hs-var">lcl_env</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TcRn (GlobalRdrEnv, LocalRdrEnv)
</span><a href="GHC.Tc.Utils.Monad.html#getRdrEnvs"><span class="hs-identifier hs-var">getRdrEnvs</span></a></span><span>
</span><span id="line-664"></span><span>           </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681127991"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681127991"><span class="hs-identifier hs-var">con_fields</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Name -&gt; RnM [FieldLabel]
</span><a href="GHC.Rename.Env.html#lookupConstructorFields"><span class="hs-identifier hs-var">lookupConstructorFields</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128003"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-665"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FieldLabel] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681127991"><span class="hs-identifier hs-var">con_fields</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#badDotDotCon"><span class="hs-identifier hs-var">badDotDotCon</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681128003"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-666"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681127988"><span class="annot"><span class="annottext">present_flds :: OccSet
</span><a href="#local-6989586621681127988"><span class="hs-identifier hs-var hs-var">present_flds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[OccName] -&gt; OccSet
</span><a href="GHC.Types.Name.Occurrence.html#mkOccSet"><span class="hs-identifier hs-var">mkOccSet</span></a></span><span> </span><span class="annot"><span class="annottext">([OccName] -&gt; OccSet) -&gt; [OccName] -&gt; OccSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(RdrName -&gt; OccName) -&gt; [RdrName] -&gt; [OccName]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName -&gt; OccName
</span><a href="GHC.Types.Name.Reader.html#rdrNameOcc"><span class="hs-identifier hs-var">rdrNameOcc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)] -&gt; [RdrName]
forall id arg. [LHsRecField id arg] -&gt; [RdrName]
</span><a href="GHC.Rename.Pat.html#getFieldLbls"><span class="hs-identifier hs-var">getFieldLbls</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)]
</span><a href="#local-6989586621681128002"><span class="hs-identifier hs-var">flds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-667"></span><span>
</span><span id="line-668"></span><span>                   </span><span class="hs-comment">-- For constructor uses (but not patterns)</span><span>
</span><span id="line-669"></span><span>                   </span><span class="hs-comment">-- the arg should be in scope locally;</span><span>
</span><span id="line-670"></span><span>                   </span><span class="hs-comment">-- i.e. not top level or imported</span><span>
</span><span id="line-671"></span><span>                   </span><span class="hs-comment">-- Eg.  data R = R { x,y :: Int }</span><span>
</span><span id="line-672"></span><span>                   </span><span class="hs-comment">--      f x = R { .. }   -- Should expand to R {x=x}, not R{x=x,y=y}</span><span>
</span><span id="line-673"></span><span>                 </span><span id="local-6989586621681127985"><span class="annot"><span class="annottext">arg_in_scope :: OccName -&gt; Bool
</span><a href="#local-6989586621681127985"><span class="hs-identifier hs-var hs-var">arg_in_scope</span></a></span></span><span> </span><span id="local-6989586621681127984"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681127984"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; RdrName
</span><a href="GHC.Types.Name.Reader.html#mkRdrUnqual"><span class="hs-identifier hs-var">mkRdrUnqual</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681127984"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName -&gt; LocalRdrEnv -&gt; Bool
</span><a href="GHC.Types.Name.Reader.html#elemLocalRdrEnv"><span class="hs-operator hs-var">`elemLocalRdrEnv`</span></a></span><span> </span><span class="annot"><span class="annottext">LocalRdrEnv
</span><a href="#local-6989586621681127992"><span class="hs-identifier hs-var">lcl_env</span></a></span><span>
</span><span id="line-674"></span><span>
</span><span id="line-675"></span><span>                 </span><span class="hs-special">(</span><span id="local-6989586621681127982"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681127982"><span class="hs-identifier hs-var">dot_dot_fields</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681127981"><span class="annot"><span class="annottext">[GlobalRdrElt]
</span><a href="#local-6989586621681127981"><span class="hs-identifier hs-var">dot_dot_gres</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-676"></span><span>                        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(FieldLabel, GlobalRdrElt)] -&gt; ([FieldLabel], [GlobalRdrElt])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="../../base/src/GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621681127979"><span class="hs-identifier hs-var">fl</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">GlobalRdrElt
</span><a href="#local-6989586621681127978"><span class="hs-identifier hs-var">gre</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-677"></span><span>                                </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681127979"><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621681127979"><span class="hs-identifier hs-var">fl</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681127991"><span class="hs-identifier hs-var">con_fields</span></a></span><span>
</span><span id="line-678"></span><span>                                </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681127977"><span class="annot"><span class="annottext">lbl :: OccName
</span><a href="#local-6989586621681127977"><span class="hs-identifier hs-var hs-var">lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; OccName
</span><a href="GHC.Types.Name.Occurrence.html#mkVarOccFS"><span class="hs-identifier hs-var">mkVarOccFS</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldLabel -&gt; FastString
forall a. FieldLbl a -&gt; FastString
</span><a href="GHC.Types.FieldLabel.html#flLabel"><span class="hs-identifier hs-var hs-var">flLabel</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621681127979"><span class="hs-identifier hs-var">fl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-679"></span><span>                                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681127977"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; OccSet -&gt; Bool
</span><a href="GHC.Types.Name.Occurrence.html#elemOccSet"><span class="hs-operator hs-var">`elemOccSet`</span></a></span><span> </span><span class="annot"><span class="annottext">OccSet
</span><a href="#local-6989586621681127988"><span class="hs-identifier hs-var">present_flds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-680"></span><span>                                </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681127978"><span class="annot"><span class="annottext">GlobalRdrElt
</span><a href="#local-6989586621681127978"><span class="hs-identifier hs-var">gre</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">GlobalRdrEnv -&gt; FieldLabel -&gt; Maybe GlobalRdrElt
</span><a href="GHC.Types.Name.Reader.html#lookupGRE_FieldLabel"><span class="hs-identifier hs-var">lookupGRE_FieldLabel</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalRdrEnv
</span><a href="#local-6989586621681127993"><span class="hs-identifier hs-var">rdr_env</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621681127979"><span class="hs-identifier hs-var">fl</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-681"></span><span>                                              </span><span class="hs-comment">-- Check selector is in scope</span><span>
</span><span id="line-682"></span><span>                                </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HsRecFieldContext
</span><a href="#local-6989586621681128048"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-683"></span><span>                                    </span><span class="annot"><a href="GHC.Rename.Pat.html#HsRecFieldCon"><span class="hs-identifier hs-type">HsRecFieldCon</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; Bool
</span><a href="#local-6989586621681127985"><span class="hs-identifier hs-var">arg_in_scope</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681127977"><span class="hs-identifier hs-var">lbl</span></a></span><span>
</span><span id="line-684"></span><span>                                    </span><span id="local-6989586621681127972"><span class="annot"><span class="annottext">HsRecFieldContext
</span><a href="#local-6989586621681127972"><span class="hs-identifier hs-var">_other</span></a></span></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-685"></span><span>
</span><span id="line-686"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">[GlobalRdrElt] -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Rename.Env.html#addUsedGREs"><span class="hs-identifier hs-var">addUsedGREs</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalRdrElt]
</span><a href="#local-6989586621681127981"><span class="hs-identifier hs-var">dot_dot_gres</span></a></span><span>
</span><span id="line-687"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)]
-&gt; IOEnv
     (Env TcGblEnv TcLclEnv)
     [LHsRecField (GhcPass 'Renamed) (Located arg)]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">SrcSpan
-&gt; HsRecField' (FieldOcc (GhcPass 'Renamed)) (Located arg)
-&gt; LHsRecField (GhcPass 'Renamed) (Located arg)
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128005"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsRecField :: forall id arg. Located id -&gt; arg -&gt; Bool -&gt; HsRecField' id arg
</span><a href="GHC.Hs.Pat.html#HsRecField"><span class="hs-identifier hs-type">HsRecField</span></a></span><span>
</span><span id="line-688"></span><span>                        </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsRecFieldLbl :: Located (FieldOcc (GhcPass 'Renamed))
</span><a href="GHC.Hs.Pat.html#hsRecFieldLbl"><span class="hs-identifier hs-var">hsRecFieldLbl</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan
-&gt; FieldOcc (GhcPass 'Renamed)
-&gt; Located (FieldOcc (GhcPass 'Renamed))
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128005"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XCFieldOcc (GhcPass 'Renamed)
-&gt; Located RdrName -&gt; FieldOcc (GhcPass 'Renamed)
forall pass. XCFieldOcc pass -&gt; Located RdrName -&gt; FieldOcc pass
</span><a href="GHC.Hs.Type.html#FieldOcc"><span class="hs-identifier hs-var">FieldOcc</span></a></span><span> </span><span class="annot"><span class="annottext">Name
XCFieldOcc (GhcPass 'Renamed)
</span><a href="#local-6989586621681127970"><span class="hs-identifier hs-var">sel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; RdrName -&gt; Located RdrName
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128005"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681127969"><span class="hs-identifier hs-var">arg_rdr</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-689"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hsRecFieldArg :: Located arg
</span><a href="GHC.Hs.Pat.html#hsRecFieldArg"><span class="hs-identifier hs-var">hsRecFieldArg</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; arg -&gt; Located arg
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128005"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; RdrName -&gt; arg
</span><a href="#local-6989586621681128047"><span class="hs-identifier hs-var">mk_arg</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681128005"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681127969"><span class="hs-identifier hs-var">arg_rdr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-690"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hsRecPun :: Bool
</span><a href="GHC.Hs.Pat.html#hsRecPun"><span class="hs-identifier hs-var">hsRecPun</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-691"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681127968"><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621681127968"><span class="hs-identifier hs-var">fl</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681127982"><span class="hs-identifier hs-var">dot_dot_fields</span></a></span><span>
</span><span id="line-692"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681127970"><span class="annot"><span class="annottext">sel :: Name
</span><a href="#local-6989586621681127970"><span class="hs-identifier hs-var hs-var">sel</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FieldLabel -&gt; Name
forall a. FieldLbl a -&gt; a
</span><a href="GHC.Types.FieldLabel.html#flSelector"><span class="hs-identifier hs-var hs-var">flSelector</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621681127968"><span class="hs-identifier hs-var">fl</span></a></span><span>
</span><span id="line-693"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681127969"><span class="annot"><span class="annottext">arg_rdr :: RdrName
</span><a href="#local-6989586621681127969"><span class="hs-identifier hs-var hs-var">arg_rdr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; RdrName
</span><a href="GHC.Types.Name.Reader.html#mkVarUnqual"><span class="hs-identifier hs-var">mkVarUnqual</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldLabel -&gt; FastString
forall a. FieldLbl a -&gt; FastString
</span><a href="GHC.Types.FieldLabel.html#flLabel"><span class="hs-identifier hs-var hs-var">flLabel</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621681127968"><span class="hs-identifier hs-var">fl</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-694"></span><span>
</span><span id="line-695"></span><span>    </span><span class="annot"><a href="#local-6989586621681128031"><span class="hs-identifier hs-var">rn_dotdot</span></a></span><span> </span><span id="local-6989586621681127965"><span class="annot"><span class="annottext">Maybe (Located Int)
</span><a href="#local-6989586621681127965"><span class="hs-identifier hs-var">_dotdot</span></a></span></span><span> </span><span id="local-6989586621681127964"><span class="annot"><span class="annottext">Maybe Name
</span><a href="#local-6989586621681127964"><span class="hs-identifier hs-var">_mb_con</span></a></span></span><span> </span><span id="local-6989586621681127963"><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)]
</span><a href="#local-6989586621681127963"><span class="hs-identifier hs-var">_flds</span></a></span></span><span>
</span><span id="line-696"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) (Located arg)]
-&gt; IOEnv
     (Env TcGblEnv TcLclEnv)
     [LHsRecField (GhcPass 'Renamed) (Located arg)]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-697"></span><span>      </span><span class="hs-comment">-- _dotdot = Nothing =&gt; No &quot;..&quot; at all</span><span>
</span><span id="line-698"></span><span>      </span><span class="hs-comment">-- _mb_con = Nothing =&gt; Record update</span><span>
</span><span id="line-699"></span><span>      </span><span class="hs-comment">-- _mb_con = Just unbound =&gt; Out of scope data constructor</span><span>
</span><span id="line-700"></span><span>
</span><span id="line-701"></span><span>    </span><span class="annot"><a href="#local-6989586621681128033"><span class="hs-identifier hs-type">dup_flds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#NonEmpty"><span class="hs-identifier hs-type">NE.NonEmpty</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-702"></span><span>        </span><span class="hs-comment">-- Each list represents a RdrName that occurred more than once</span><span>
</span><span id="line-703"></span><span>        </span><span class="hs-comment">-- (the list contains all occurrences)</span><span>
</span><span id="line-704"></span><span>        </span><span class="hs-comment">-- Each list in dup_fields is non-empty</span><span>
</span><span id="line-705"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[RdrName]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681128033"><span class="annot"><span class="annottext">[NonEmpty RdrName]
</span><a href="#local-6989586621681128033"><span class="hs-identifier hs-var">dup_flds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RdrName -&gt; RdrName -&gt; Ordering)
-&gt; [RdrName] -&gt; ([RdrName], [NonEmpty RdrName])
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; ([a], [NonEmpty a])
</span><a href="GHC.Data.List.SetOps.html#removeDups"><span class="hs-identifier hs-var">removeDups</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName -&gt; RdrName -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[LHsRecField GhcPs (Located arg)] -&gt; [RdrName]
forall id arg. [LHsRecField id arg] -&gt; [RdrName]
</span><a href="GHC.Rename.Pat.html#getFieldLbls"><span class="hs-identifier hs-var">getFieldLbls</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsRecField GhcPs (Located arg)]
</span><a href="#local-6989586621681128046"><span class="hs-identifier hs-var">flds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-706"></span><span>
</span><span id="line-707"></span><span>
</span><span id="line-708"></span><span class="hs-comment">-- NB: Consider this:</span><span>
</span><span id="line-709"></span><span class="hs-comment">--      module Foo where { data R = R { fld :: Int } }</span><span>
</span><span id="line-710"></span><span class="hs-comment">--      module Odd where { import Foo; fld x = x { fld = 3 } }</span><span>
</span><span id="line-711"></span><span class="hs-comment">-- Arguably this should work, because the reference to 'fld' is</span><span>
</span><span id="line-712"></span><span class="hs-comment">-- unambiguous because there is only one field id 'fld' in scope.</span><span>
</span><span id="line-713"></span><span class="hs-comment">-- But currently it's rejected.</span><span>
</span><span id="line-714"></span><span>
</span><span id="line-715"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnHsRecUpdFields"><span class="hs-identifier hs-type">rnHsRecUpdFields</span></a></span><span>
</span><span id="line-716"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecUpdField"><span class="hs-identifier hs-type">LHsRecUpdField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-717"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecUpdField"><span class="hs-identifier hs-type">LHsRecUpdField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-718"></span><span id="rnHsRecUpdFields"><span class="annot"><span class="annottext">rnHsRecUpdFields :: [LHsRecUpdField GhcPs]
-&gt; RnM ([LHsRecUpdField (GhcPass 'Renamed)], FreeVars)
</span><a href="GHC.Rename.Pat.html#rnHsRecUpdFields"><span class="hs-identifier hs-var hs-var">rnHsRecUpdFields</span></a></span></span><span> </span><span id="local-6989586621681127961"><span class="annot"><span class="annottext">[LHsRecUpdField GhcPs]
</span><a href="#local-6989586621681127961"><span class="hs-identifier hs-var">flds</span></a></span></span><span>
</span><span id="line-719"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681127960"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127960"><span class="hs-identifier hs-var">pun_ok</span></a></span></span><span>        </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; RnM Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#RecordPuns"><span class="hs-identifier hs-var">LangExt.RecordPuns</span></a></span><span>
</span><span id="line-720"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681127959"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127959"><span class="hs-identifier hs-var">overload_ok</span></a></span></span><span>   </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; RnM Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#DuplicateRecordFields"><span class="hs-identifier hs-var">LangExt.DuplicateRecordFields</span></a></span><span>
</span><span id="line-721"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681127957"><span class="annot"><span class="annottext">[LHsRecUpdField (GhcPass 'Renamed)]
</span><a href="#local-6989586621681127957"><span class="hs-identifier hs-var">flds1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681127956"><span class="annot"><span class="annottext">[FreeVars]
</span><a href="#local-6989586621681127956"><span class="hs-identifier hs-var">fvss</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(LHsRecUpdField GhcPs
 -&gt; IOEnv
      (Env TcGblEnv TcLclEnv)
      (LHsRecUpdField (GhcPass 'Renamed), FreeVars))
-&gt; [LHsRecUpdField GhcPs]
-&gt; IOEnv
     (Env TcGblEnv TcLclEnv)
     ([LHsRecUpdField (GhcPass 'Renamed)], [FreeVars])
forall (m :: * -&gt; *) a b c.
Applicative m =&gt;
(a -&gt; m (b, c)) -&gt; [a] -&gt; m ([b], [c])
</span><a href="../../base/src/Control.Monad.html#mapAndUnzipM"><span class="hs-identifier hs-var">mapAndUnzipM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
-&gt; Bool
-&gt; LHsRecUpdField GhcPs
-&gt; IOEnv
     (Env TcGblEnv TcLclEnv)
     (LHsRecUpdField (GhcPass 'Renamed), FreeVars)
</span><a href="#local-6989586621681127954"><span class="hs-identifier hs-var">rn_fld</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127960"><span class="hs-identifier hs-var">pun_ok</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127959"><span class="hs-identifier hs-var">overload_ok</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LHsRecUpdField GhcPs]
</span><a href="#local-6989586621681127961"><span class="hs-identifier hs-var">flds</span></a></span><span>
</span><span id="line-722"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(NonEmpty RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) ())
-&gt; [NonEmpty RdrName] -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; IOEnv (Env TcGblEnv TcLclEnv) ())
-&gt; (NonEmpty RdrName -&gt; MsgDoc)
-&gt; NonEmpty RdrName
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecFieldContext -&gt; NonEmpty RdrName -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#dupFieldErr"><span class="hs-identifier hs-var">dupFieldErr</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecFieldContext
</span><a href="GHC.Rename.Pat.html#HsRecFieldUpd"><span class="hs-identifier hs-var">HsRecFieldUpd</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[NonEmpty RdrName]
</span><a href="#local-6989586621681127953"><span class="hs-identifier hs-var">dup_flds</span></a></span><span>
</span><span id="line-723"></span><span>
</span><span id="line-724"></span><span>       </span><span class="hs-comment">-- Check for an empty record update  e {}</span><span>
</span><span id="line-725"></span><span>       </span><span class="hs-comment">-- NB: don't complain about e { .. }, because rn_dotdot has done that already</span><span>
</span><span id="line-726"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[LHsRecUpdField GhcPs] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsRecUpdField GhcPs]
</span><a href="#local-6989586621681127961"><span class="hs-identifier hs-var">flds</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IOEnv (Env TcGblEnv TcLclEnv) ()
 -&gt; IOEnv (Env TcGblEnv TcLclEnv) ())
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
-&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Rename.Pat.html#emptyUpdateErr"><span class="hs-identifier hs-var">emptyUpdateErr</span></a></span><span>
</span><span id="line-727"></span><span>
</span><span id="line-728"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">([LHsRecUpdField (GhcPass 'Renamed)], FreeVars)
-&gt; RnM ([LHsRecUpdField (GhcPass 'Renamed)], FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[LHsRecUpdField (GhcPass 'Renamed)]
</span><a href="#local-6989586621681127957"><span class="hs-identifier hs-var">flds1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[FreeVars] -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#plusFVs"><span class="hs-identifier hs-var">plusFVs</span></a></span><span> </span><span class="annot"><span class="annottext">[FreeVars]
</span><a href="#local-6989586621681127956"><span class="hs-identifier hs-var">fvss</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-729"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-730"></span><span>    </span><span id="local-6989586621681127950"><span class="annot"><span class="annottext">doc :: MsgDoc
</span><a href="#local-6989586621681127950"><span class="hs-identifier hs-var hs-var">doc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;constructor field name&quot;</span></span><span>
</span><span id="line-731"></span><span>
</span><span id="line-732"></span><span>    </span><span class="annot"><a href="#local-6989586621681127954"><span class="hs-identifier hs-type">rn_fld</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecUpdField"><span class="hs-identifier hs-type">LHsRecUpdField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-733"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecUpdField"><span class="hs-identifier hs-type">LHsRecUpdField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-734"></span><span>    </span><span id="local-6989586621681127954"><span class="annot"><span class="annottext">rn_fld :: Bool
-&gt; Bool
-&gt; LHsRecUpdField GhcPs
-&gt; IOEnv
     (Env TcGblEnv TcLclEnv)
     (LHsRecUpdField (GhcPass 'Renamed), FreeVars)
</span><a href="#local-6989586621681127954"><span class="hs-identifier hs-var hs-var">rn_fld</span></a></span></span><span> </span><span id="local-6989586621681127949"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127949"><span class="hs-identifier hs-var">pun_ok</span></a></span></span><span> </span><span id="local-6989586621681127948"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127948"><span class="hs-identifier hs-var">overload_ok</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681127947"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681127947"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#HsRecField"><span class="hs-identifier hs-type">HsRecField</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsRecFieldLbl :: forall id arg. HsRecField' id arg -&gt; Located id
</span><a href="GHC.Hs.Pat.html#hsRecFieldLbl"><span class="hs-identifier hs-var">hsRecFieldLbl</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681127946"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681127946"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681127945"><span class="annot"><span class="annottext">AmbiguousFieldOcc GhcPs
</span><a href="#local-6989586621681127945"><span class="hs-identifier hs-var">f</span></a></span></span><span>
</span><span id="line-735"></span><span>                                               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hsRecFieldArg :: forall id arg. HsRecField' id arg -&gt; arg
</span><a href="GHC.Hs.Pat.html#hsRecFieldArg"><span class="hs-identifier hs-var">hsRecFieldArg</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681127944"><span class="annot"><span class="annottext">LHsExpr GhcPs
</span><a href="#local-6989586621681127944"><span class="hs-identifier hs-var">arg</span></a></span></span><span>
</span><span id="line-736"></span><span>                                               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hsRecPun :: forall id arg. HsRecField' id arg -&gt; Bool
</span><a href="GHC.Hs.Pat.html#hsRecPun"><span class="hs-identifier hs-var">hsRecPun</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681127943"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127943"><span class="hs-identifier hs-var">pun</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-737"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681127942"><span class="annot"><span class="annottext">lbl :: RdrName
</span><a href="#local-6989586621681127942"><span class="hs-identifier hs-var hs-var">lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AmbiguousFieldOcc GhcPs -&gt; RdrName
forall (p :: Pass). AmbiguousFieldOcc (GhcPass p) -&gt; RdrName
</span><a href="GHC.Hs.Type.html#rdrNameAmbiguousFieldOcc"><span class="hs-identifier hs-var">rdrNameAmbiguousFieldOcc</span></a></span><span> </span><span class="annot"><span class="annottext">AmbiguousFieldOcc GhcPs
</span><a href="#local-6989586621681127945"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-738"></span><span>           </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681127940"><span class="annot"><span class="annottext">Either Name [Name]
</span><a href="#local-6989586621681127940"><span class="hs-identifier hs-var">sel</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; TcRn (Either Name [Name]) -&gt; TcRn (Either Name [Name])
forall a. SrcSpan -&gt; TcRn a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#setSrcSpan"><span class="hs-identifier hs-var">setSrcSpan</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681127946"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">(TcRn (Either Name [Name]) -&gt; TcRn (Either Name [Name]))
-&gt; TcRn (Either Name [Name]) -&gt; TcRn (Either Name [Name])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-739"></span><span>                      </span><span class="hs-comment">-- Defer renaming of overloaded fields to the typechecker</span><span>
</span><span id="line-740"></span><span>                      </span><span class="hs-comment">-- See Note [Disambiguating record fields] in GHC.Tc.Gen.Expr</span><span>
</span><span id="line-741"></span><span>                      </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127948"><span class="hs-identifier hs-var">overload_ok</span></a></span><span>
</span><span id="line-742"></span><span>                          </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681127939"><span class="annot"><span class="annottext">Maybe (Either Name [Name])
</span><a href="#local-6989586621681127939"><span class="hs-identifier hs-var">mb</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; RdrName -&gt; RnM (Maybe (Either Name [Name]))
</span><a href="GHC.Rename.Env.html#lookupGlobalOccRn_overloaded"><span class="hs-identifier hs-var">lookupGlobalOccRn_overloaded</span></a></span><span>
</span><span id="line-743"></span><span>                                            </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127948"><span class="hs-identifier hs-var">overload_ok</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681127942"><span class="hs-identifier hs-var">lbl</span></a></span><span>
</span><span id="line-744"></span><span>                                  </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe (Either Name [Name])
</span><a href="#local-6989586621681127939"><span class="hs-identifier hs-var">mb</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-745"></span><span>                                      </span><span class="annot"><span class="annottext">Maybe (Either Name [Name])
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-746"></span><span>                                        </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span>
</span><span id="line-747"></span><span>                                               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; RdrName -&gt; MsgDoc
</span><a href="GHC.Rename.Utils.html#unknownSubordinateErr"><span class="hs-identifier hs-var">unknownSubordinateErr</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681127950"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681127942"><span class="hs-identifier hs-var">lbl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-748"></span><span>                                           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Either Name [Name] -&gt; TcRn (Either Name [Name])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Name] -&gt; Either Name [Name]
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-749"></span><span>                                      </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681127937"><span class="annot"><span class="annottext">Either Name [Name]
</span><a href="#local-6989586621681127937"><span class="hs-identifier hs-var">r</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Either Name [Name] -&gt; TcRn (Either Name [Name])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Either Name [Name]
</span><a href="#local-6989586621681127937"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-750"></span><span>                          </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Either Name [Name])
-&gt; RnM Name -&gt; TcRn (Either Name [Name])
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Either Name [Name]
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">(RnM Name -&gt; TcRn (Either Name [Name]))
-&gt; RnM Name -&gt; TcRn (Either Name [Name])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName -&gt; RnM Name
</span><a href="GHC.Rename.Env.html#lookupGlobalOccRn"><span class="hs-identifier hs-var">lookupGlobalOccRn</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681127942"><span class="hs-identifier hs-var">lbl</span></a></span><span>
</span><span id="line-751"></span><span>           </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681127935"><span class="annot"><span class="annottext">LHsExpr GhcPs
</span><a href="#local-6989586621681127935"><span class="hs-identifier hs-var">arg'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127943"><span class="hs-identifier hs-var">pun</span></a></span><span>
</span><span id="line-752"></span><span>                     </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; MsgDoc -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Tc.Utils.Monad.html#checkErr"><span class="hs-identifier hs-var">checkErr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127949"><span class="hs-identifier hs-var">pun_ok</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located RdrName -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#badPun"><span class="hs-identifier hs-var">badPun</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; RdrName -&gt; Located RdrName
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681127946"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681127942"><span class="hs-identifier hs-var">lbl</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-753"></span><span>                               </span><span class="hs-comment">-- Discard any module qualifier (#11662)</span><span>
</span><span id="line-754"></span><span>                             </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681127934"><span class="annot"><span class="annottext">arg_rdr :: RdrName
</span><a href="#local-6989586621681127934"><span class="hs-identifier hs-var hs-var">arg_rdr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; RdrName
</span><a href="GHC.Types.Name.Reader.html#mkRdrUnqual"><span class="hs-identifier hs-var">mkRdrUnqual</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RdrName -&gt; OccName
</span><a href="GHC.Types.Name.Reader.html#rdrNameOcc"><span class="hs-identifier hs-var">rdrNameOcc</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681127942"><span class="hs-identifier hs-var">lbl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-755"></span><span>                             </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcPs -&gt; IOEnv (Env TcGblEnv TcLclEnv) (LHsExpr GhcPs)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; HsExpr GhcPs -&gt; LHsExpr GhcPs
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681127946"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XVar GhcPs -&gt; GenLocated SrcSpan (IdP GhcPs) -&gt; HsExpr GhcPs
forall p. XVar p -&gt; Located (IdP p) -&gt; HsExpr p
</span><a href="GHC.Hs.Expr.html#HsVar"><span class="hs-identifier hs-var">HsVar</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XVar GhcPs
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; RdrName -&gt; Located RdrName
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681127946"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681127934"><span class="hs-identifier hs-var">arg_rdr</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-756"></span><span>                     </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcPs -&gt; IOEnv (Env TcGblEnv TcLclEnv) (LHsExpr GhcPs)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcPs
</span><a href="#local-6989586621681127944"><span class="hs-identifier hs-var">arg</span></a></span><span>
</span><span id="line-757"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681127932"><span class="annot"><span class="annottext">LHsExpr (GhcPass 'Renamed)
</span><a href="#local-6989586621681127932"><span class="hs-identifier hs-var">arg''</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681127931"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681127931"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcPs -&gt; RnM (LHsExpr (GhcPass 'Renamed), FreeVars)
</span><a href="GHC.Rename.Expr.html#rnLExpr"><span class="hs-identifier hs-var">rnLExpr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcPs
</span><a href="#local-6989586621681127935"><span class="hs-identifier hs-var">arg'</span></a></span><span>
</span><span id="line-758"></span><span>
</span><span id="line-759"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681127930"><span class="annot"><span class="annottext">fvs' :: FreeVars
</span><a href="#local-6989586621681127930"><span class="hs-identifier hs-var hs-var">fvs'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either Name [Name]
</span><a href="#local-6989586621681127940"><span class="hs-identifier hs-var">sel</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-760"></span><span>                          </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621681127929"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681127929"><span class="hs-identifier hs-var">sel_name</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681127931"><span class="hs-identifier hs-var">fvs</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; Name -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#addOneFV"><span class="hs-operator hs-var">`addOneFV`</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681127929"><span class="hs-identifier hs-var">sel_name</span></a></span><span>
</span><span id="line-761"></span><span>                          </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span class="hs-special">[</span><span id="local-6989586621681127928"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681127928"><span class="hs-identifier hs-var">sel_name</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681127931"><span class="hs-identifier hs-var">fvs</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; Name -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#addOneFV"><span class="hs-operator hs-var">`addOneFV`</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681127928"><span class="hs-identifier hs-var">sel_name</span></a></span><span>
</span><span id="line-762"></span><span>                          </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681127931"><span class="hs-identifier hs-var">fvs</span></a></span><span>
</span><span id="line-763"></span><span>                 </span><span id="local-6989586621681127927"><span class="annot"><span class="annottext">lbl' :: GenLocated SrcSpan (AmbiguousFieldOcc (GhcPass 'Renamed))
</span><a href="#local-6989586621681127927"><span class="hs-identifier hs-var hs-var">lbl'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Either Name [Name]
</span><a href="#local-6989586621681127940"><span class="hs-identifier hs-var">sel</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-764"></span><span>                          </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621681127926"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681127926"><span class="hs-identifier hs-var">sel_name</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-765"></span><span>                                     </span><span class="annot"><span class="annottext">SrcSpan
-&gt; AmbiguousFieldOcc (GhcPass 'Renamed)
-&gt; GenLocated SrcSpan (AmbiguousFieldOcc (GhcPass 'Renamed))
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681127946"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XUnambiguous (GhcPass 'Renamed)
-&gt; Located RdrName -&gt; AmbiguousFieldOcc (GhcPass 'Renamed)
forall pass.
XUnambiguous pass -&gt; Located RdrName -&gt; AmbiguousFieldOcc pass
</span><a href="GHC.Hs.Type.html#Unambiguous"><span class="hs-identifier hs-var">Unambiguous</span></a></span><span> </span><span class="annot"><span class="annottext">Name
XUnambiguous (GhcPass 'Renamed)
</span><a href="#local-6989586621681127926"><span class="hs-identifier hs-var">sel_name</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; RdrName -&gt; Located RdrName
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681127946"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681127942"><span class="hs-identifier hs-var">lbl</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-766"></span><span>                          </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span class="hs-special">[</span><span id="local-6989586621681127924"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681127924"><span class="hs-identifier hs-var">sel_name</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-767"></span><span>                                     </span><span class="annot"><span class="annottext">SrcSpan
-&gt; AmbiguousFieldOcc (GhcPass 'Renamed)
-&gt; GenLocated SrcSpan (AmbiguousFieldOcc (GhcPass 'Renamed))
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681127946"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XUnambiguous (GhcPass 'Renamed)
-&gt; Located RdrName -&gt; AmbiguousFieldOcc (GhcPass 'Renamed)
forall pass.
XUnambiguous pass -&gt; Located RdrName -&gt; AmbiguousFieldOcc pass
</span><a href="GHC.Hs.Type.html#Unambiguous"><span class="hs-identifier hs-var">Unambiguous</span></a></span><span> </span><span class="annot"><span class="annottext">Name
XUnambiguous (GhcPass 'Renamed)
</span><a href="#local-6989586621681127924"><span class="hs-identifier hs-var">sel_name</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; RdrName -&gt; Located RdrName
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681127946"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681127942"><span class="hs-identifier hs-var">lbl</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-768"></span><span>                          </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SrcSpan
-&gt; AmbiguousFieldOcc (GhcPass 'Renamed)
-&gt; GenLocated SrcSpan (AmbiguousFieldOcc (GhcPass 'Renamed))
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681127946"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XAmbiguous (GhcPass 'Renamed)
-&gt; Located RdrName -&gt; AmbiguousFieldOcc (GhcPass 'Renamed)
forall pass.
XAmbiguous pass -&gt; Located RdrName -&gt; AmbiguousFieldOcc pass
</span><a href="GHC.Hs.Type.html#Ambiguous"><span class="hs-identifier hs-var">Ambiguous</span></a></span><span>   </span><span class="annot"><span class="annottext">NoExtField
XAmbiguous (GhcPass 'Renamed)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; RdrName -&gt; Located RdrName
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681127946"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681127942"><span class="hs-identifier hs-var">lbl</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-769"></span><span>
</span><span id="line-770"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(LHsRecUpdField (GhcPass 'Renamed), FreeVars)
-&gt; IOEnv
     (Env TcGblEnv TcLclEnv)
     (LHsRecUpdField (GhcPass 'Renamed), FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan
-&gt; HsRecField'
     (AmbiguousFieldOcc (GhcPass 'Renamed)) (LHsExpr (GhcPass 'Renamed))
-&gt; LHsRecUpdField (GhcPass 'Renamed)
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681127947"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsRecField :: forall id arg. Located id -&gt; arg -&gt; Bool -&gt; HsRecField' id arg
</span><a href="GHC.Hs.Pat.html#HsRecField"><span class="hs-identifier hs-type">HsRecField</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsRecFieldLbl :: GenLocated SrcSpan (AmbiguousFieldOcc (GhcPass 'Renamed))
</span><a href="GHC.Hs.Pat.html#hsRecFieldLbl"><span class="hs-identifier hs-var">hsRecFieldLbl</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (AmbiguousFieldOcc (GhcPass 'Renamed))
</span><a href="#local-6989586621681127927"><span class="hs-identifier hs-var">lbl'</span></a></span><span>
</span><span id="line-771"></span><span>                                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hsRecFieldArg :: LHsExpr (GhcPass 'Renamed)
</span><a href="GHC.Hs.Pat.html#hsRecFieldArg"><span class="hs-identifier hs-var">hsRecFieldArg</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsExpr (GhcPass 'Renamed)
</span><a href="#local-6989586621681127932"><span class="hs-identifier hs-var">arg''</span></a></span><span>
</span><span id="line-772"></span><span>                                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hsRecPun :: Bool
</span><a href="GHC.Hs.Pat.html#hsRecPun"><span class="hs-identifier hs-var">hsRecPun</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127943"><span class="hs-identifier hs-var">pun</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681127930"><span class="hs-identifier hs-var">fvs'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-773"></span><span>
</span><span id="line-774"></span><span>    </span><span class="annot"><a href="#local-6989586621681127953"><span class="hs-identifier hs-type">dup_flds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#NonEmpty"><span class="hs-identifier hs-type">NE.NonEmpty</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-775"></span><span>        </span><span class="hs-comment">-- Each list represents a RdrName that occurred more than once</span><span>
</span><span id="line-776"></span><span>        </span><span class="hs-comment">-- (the list contains all occurrences)</span><span>
</span><span id="line-777"></span><span>        </span><span class="hs-comment">-- Each list in dup_fields is non-empty</span><span>
</span><span id="line-778"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[RdrName]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681127953"><span class="annot"><span class="annottext">[NonEmpty RdrName]
</span><a href="#local-6989586621681127953"><span class="hs-identifier hs-var">dup_flds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RdrName -&gt; RdrName -&gt; Ordering)
-&gt; [RdrName] -&gt; ([RdrName], [NonEmpty RdrName])
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; ([a], [NonEmpty a])
</span><a href="GHC.Data.List.SetOps.html#removeDups"><span class="hs-identifier hs-var">removeDups</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName -&gt; RdrName -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[LHsRecUpdField GhcPs] -&gt; [RdrName]
</span><a href="GHC.Rename.Pat.html#getFieldUpdLbls"><span class="hs-identifier hs-var">getFieldUpdLbls</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsRecUpdField GhcPs]
</span><a href="#local-6989586621681127961"><span class="hs-identifier hs-var">flds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-779"></span><span>
</span><span id="line-780"></span><span>
</span><span id="line-781"></span><span>
</span><span id="line-782"></span><span id="local-6989586621681128700"><span class="annot"><a href="GHC.Rename.Pat.html#getFieldIds"><span class="hs-identifier hs-type">getFieldIds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecField"><span class="hs-identifier hs-type">LHsRecField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128700"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-783"></span><span id="getFieldIds"><span class="annot"><span class="annottext">getFieldIds :: forall arg. [LHsRecField (GhcPass 'Renamed) arg] -&gt; [Name]
</span><a href="GHC.Rename.Pat.html#getFieldIds"><span class="hs-identifier hs-var hs-var">getFieldIds</span></a></span></span><span> </span><span id="local-6989586621681127921"><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) arg]
</span><a href="#local-6989586621681127921"><span class="hs-identifier hs-var">flds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LHsRecField (GhcPass 'Renamed) arg -&gt; Name)
-&gt; [LHsRecField (GhcPass 'Renamed) arg] -&gt; [Name]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located Name -&gt; Name
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(Located Name -&gt; Name)
-&gt; (LHsRecField (GhcPass 'Renamed) arg -&gt; Located Name)
-&gt; LHsRecField (GhcPass 'Renamed) arg
-&gt; Name
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecField (GhcPass 'Renamed) arg -&gt; Located Name
forall pass arg. HsRecField pass arg -&gt; Located (XCFieldOcc pass)
</span><a href="GHC.Hs.Pat.html#hsRecFieldSel"><span class="hs-identifier hs-var">hsRecFieldSel</span></a></span><span> </span><span class="annot"><span class="annottext">(HsRecField (GhcPass 'Renamed) arg -&gt; Located Name)
-&gt; (LHsRecField (GhcPass 'Renamed) arg
    -&gt; HsRecField (GhcPass 'Renamed) arg)
-&gt; LHsRecField (GhcPass 'Renamed) arg
-&gt; Located Name
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LHsRecField (GhcPass 'Renamed) arg
-&gt; HsRecField (GhcPass 'Renamed) arg
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LHsRecField (GhcPass 'Renamed) arg]
</span><a href="#local-6989586621681127921"><span class="hs-identifier hs-var">flds</span></a></span><span>
</span><span id="line-784"></span><span>
</span><span id="line-785"></span><span id="local-6989586621681128685"><span id="local-6989586621681128686"><span class="annot"><a href="GHC.Rename.Pat.html#getFieldLbls"><span class="hs-identifier hs-type">getFieldLbls</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecField"><span class="hs-identifier hs-type">LHsRecField</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128686"><span class="hs-identifier hs-type">id</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128685"><span class="hs-identifier hs-type">arg</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-786"></span><span id="getFieldLbls"><span class="annot"><span class="annottext">getFieldLbls :: forall id arg. [LHsRecField id arg] -&gt; [RdrName]
</span><a href="GHC.Rename.Pat.html#getFieldLbls"><span class="hs-identifier hs-var hs-var">getFieldLbls</span></a></span></span><span> </span><span id="local-6989586621681127919"><span class="annot"><span class="annottext">[LHsRecField id arg]
</span><a href="#local-6989586621681127919"><span class="hs-identifier hs-var">flds</span></a></span></span><span>
</span><span id="line-787"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LHsRecField id arg -&gt; RdrName)
-&gt; [LHsRecField id arg] -&gt; [RdrName]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located RdrName -&gt; RdrName
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(Located RdrName -&gt; RdrName)
-&gt; (LHsRecField id arg -&gt; Located RdrName)
-&gt; LHsRecField id arg
-&gt; RdrName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">FieldOcc id -&gt; Located RdrName
forall pass. FieldOcc pass -&gt; Located RdrName
</span><a href="GHC.Hs.Type.html#rdrNameFieldOcc"><span class="hs-identifier hs-var hs-var">rdrNameFieldOcc</span></a></span><span> </span><span class="annot"><span class="annottext">(FieldOcc id -&gt; Located RdrName)
-&gt; (LHsRecField id arg -&gt; FieldOcc id)
-&gt; LHsRecField id arg
-&gt; Located RdrName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (FieldOcc id) -&gt; FieldOcc id
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (FieldOcc id) -&gt; FieldOcc id)
-&gt; (LHsRecField id arg -&gt; GenLocated SrcSpan (FieldOcc id))
-&gt; LHsRecField id arg
-&gt; FieldOcc id
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecField' (FieldOcc id) arg -&gt; GenLocated SrcSpan (FieldOcc id)
forall id arg. HsRecField' id arg -&gt; Located id
</span><a href="GHC.Hs.Pat.html#hsRecFieldLbl"><span class="hs-identifier hs-var hs-var">hsRecFieldLbl</span></a></span><span> </span><span class="annot"><span class="annottext">(HsRecField' (FieldOcc id) arg -&gt; GenLocated SrcSpan (FieldOcc id))
-&gt; (LHsRecField id arg -&gt; HsRecField' (FieldOcc id) arg)
-&gt; LHsRecField id arg
-&gt; GenLocated SrcSpan (FieldOcc id)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LHsRecField id arg -&gt; HsRecField' (FieldOcc id) arg
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LHsRecField id arg]
</span><a href="#local-6989586621681127919"><span class="hs-identifier hs-var">flds</span></a></span><span>
</span><span id="line-788"></span><span>
</span><span id="line-789"></span><span class="annot"><a href="GHC.Rename.Pat.html#getFieldUpdLbls"><span class="hs-identifier hs-type">getFieldUpdLbls</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Pat.html#LHsRecUpdField"><span class="hs-identifier hs-type">LHsRecUpdField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-790"></span><span id="getFieldUpdLbls"><span class="annot"><span class="annottext">getFieldUpdLbls :: [LHsRecUpdField GhcPs] -&gt; [RdrName]
</span><a href="GHC.Rename.Pat.html#getFieldUpdLbls"><span class="hs-identifier hs-var hs-var">getFieldUpdLbls</span></a></span></span><span> </span><span id="local-6989586621681127917"><span class="annot"><span class="annottext">[LHsRecUpdField GhcPs]
</span><a href="#local-6989586621681127917"><span class="hs-identifier hs-var">flds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LHsRecUpdField GhcPs -&gt; RdrName)
-&gt; [LHsRecUpdField GhcPs] -&gt; [RdrName]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">AmbiguousFieldOcc GhcPs -&gt; RdrName
forall (p :: Pass). AmbiguousFieldOcc (GhcPass p) -&gt; RdrName
</span><a href="GHC.Hs.Type.html#rdrNameAmbiguousFieldOcc"><span class="hs-identifier hs-var">rdrNameAmbiguousFieldOcc</span></a></span><span> </span><span class="annot"><span class="annottext">(AmbiguousFieldOcc GhcPs -&gt; RdrName)
-&gt; (LHsRecUpdField GhcPs -&gt; AmbiguousFieldOcc GhcPs)
-&gt; LHsRecUpdField GhcPs
-&gt; RdrName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (AmbiguousFieldOcc GhcPs)
-&gt; AmbiguousFieldOcc GhcPs
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan (AmbiguousFieldOcc GhcPs)
 -&gt; AmbiguousFieldOcc GhcPs)
-&gt; (LHsRecUpdField GhcPs
    -&gt; GenLocated SrcSpan (AmbiguousFieldOcc GhcPs))
-&gt; LHsRecUpdField GhcPs
-&gt; AmbiguousFieldOcc GhcPs
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecField' (AmbiguousFieldOcc GhcPs) (LHsExpr GhcPs)
-&gt; GenLocated SrcSpan (AmbiguousFieldOcc GhcPs)
forall id arg. HsRecField' id arg -&gt; Located id
</span><a href="GHC.Hs.Pat.html#hsRecFieldLbl"><span class="hs-identifier hs-var hs-var">hsRecFieldLbl</span></a></span><span> </span><span class="annot"><span class="annottext">(HsRecField' (AmbiguousFieldOcc GhcPs) (LHsExpr GhcPs)
 -&gt; GenLocated SrcSpan (AmbiguousFieldOcc GhcPs))
-&gt; (LHsRecUpdField GhcPs
    -&gt; HsRecField' (AmbiguousFieldOcc GhcPs) (LHsExpr GhcPs))
-&gt; LHsRecUpdField GhcPs
-&gt; GenLocated SrcSpan (AmbiguousFieldOcc GhcPs)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LHsRecUpdField GhcPs
-&gt; HsRecField' (AmbiguousFieldOcc GhcPs) (LHsExpr GhcPs)
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LHsRecUpdField GhcPs]
</span><a href="#local-6989586621681127917"><span class="hs-identifier hs-var">flds</span></a></span><span>
</span><span id="line-791"></span><span>
</span><span id="line-792"></span><span class="annot"><a href="GHC.Rename.Pat.html#needFlagDotDot"><span class="hs-identifier hs-type">needFlagDotDot</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#HsRecFieldContext"><span class="hs-identifier hs-type">HsRecFieldContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-793"></span><span id="needFlagDotDot"><span class="annot"><span class="annottext">needFlagDotDot :: HsRecFieldContext -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#needFlagDotDot"><span class="hs-identifier hs-var hs-var">needFlagDotDot</span></a></span></span><span> </span><span id="local-6989586621681127915"><span class="annot"><span class="annottext">HsRecFieldContext
</span><a href="#local-6989586621681127915"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Illegal `..' in record&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecFieldContext -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#pprRFC"><span class="hs-identifier hs-var">pprRFC</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecFieldContext
</span><a href="#local-6989586621681127915"><span class="hs-identifier hs-var">ctxt</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-794"></span><span>                            </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Use RecordWildCards to permit this&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-795"></span><span>
</span><span id="line-796"></span><span class="annot"><a href="GHC.Rename.Pat.html#badDotDotCon"><span class="hs-identifier hs-type">badDotDotCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-797"></span><span id="badDotDotCon"><span class="annot"><span class="annottext">badDotDotCon :: Name -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#badDotDotCon"><span class="hs-identifier hs-var hs-var">badDotDotCon</span></a></span></span><span> </span><span id="local-6989586621681127912"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681127912"><span class="hs-identifier hs-var">con</span></a></span></span><span>
</span><span id="line-798"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Illegal `..' notation for constructor&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681127912"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-799"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;The constructor has no labelled fields&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-800"></span><span>
</span><span id="line-801"></span><span class="annot"><a href="GHC.Rename.Pat.html#emptyUpdateErr"><span class="hs-identifier hs-type">emptyUpdateErr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-802"></span><span id="emptyUpdateErr"><span class="annot"><span class="annottext">emptyUpdateErr :: MsgDoc
</span><a href="GHC.Rename.Pat.html#emptyUpdateErr"><span class="hs-identifier hs-var hs-var">emptyUpdateErr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Empty record update&quot;</span></span><span>
</span><span id="line-803"></span><span>
</span><span id="line-804"></span><span class="annot"><a href="GHC.Rename.Pat.html#badPun"><span class="hs-identifier hs-type">badPun</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-805"></span><span id="badPun"><span class="annot"><span class="annottext">badPun :: Located RdrName -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#badPun"><span class="hs-identifier hs-var hs-var">badPun</span></a></span></span><span> </span><span id="local-6989586621681127908"><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681127908"><span class="hs-identifier hs-var">fld</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Illegal use of punning for field&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Located RdrName -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Located RdrName
</span><a href="#local-6989586621681127908"><span class="hs-identifier hs-var">fld</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-806"></span><span>                   </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Use NamedFieldPuns to permit this&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-807"></span><span>
</span><span id="line-808"></span><span class="annot"><a href="GHC.Rename.Pat.html#dupFieldErr"><span class="hs-identifier hs-type">dupFieldErr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#HsRecFieldContext"><span class="hs-identifier hs-type">HsRecFieldContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#NonEmpty"><span class="hs-identifier hs-type">NE.NonEmpty</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-809"></span><span id="dupFieldErr"><span class="annot"><span class="annottext">dupFieldErr :: HsRecFieldContext -&gt; NonEmpty RdrName -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#dupFieldErr"><span class="hs-identifier hs-var hs-var">dupFieldErr</span></a></span></span><span> </span><span id="local-6989586621681127907"><span class="annot"><span class="annottext">HsRecFieldContext
</span><a href="#local-6989586621681127907"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span id="local-6989586621681127906"><span class="annot"><span class="annottext">NonEmpty RdrName
</span><a href="#local-6989586621681127906"><span class="hs-identifier hs-var">dups</span></a></span></span><span>
</span><span id="line-810"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;duplicate field name&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-811"></span><span>          </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RdrName -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NonEmpty RdrName -&gt; RdrName
forall a. NonEmpty a -&gt; a
</span><a href="../../base/src/Data.List.NonEmpty.html#head"><span class="hs-identifier hs-var">NE.head</span></a></span><span> </span><span class="annot"><span class="annottext">NonEmpty RdrName
</span><a href="#local-6989586621681127906"><span class="hs-identifier hs-var">dups</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-812"></span><span>          </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;in record&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HsRecFieldContext -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#pprRFC"><span class="hs-identifier hs-var">pprRFC</span></a></span><span> </span><span class="annot"><span class="annottext">HsRecFieldContext
</span><a href="#local-6989586621681127907"><span class="hs-identifier hs-var">ctxt</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-813"></span><span>
</span><span id="line-814"></span><span class="annot"><a href="GHC.Rename.Pat.html#pprRFC"><span class="hs-identifier hs-type">pprRFC</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Pat.html#HsRecFieldContext"><span class="hs-identifier hs-type">HsRecFieldContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-815"></span><span id="pprRFC"><span class="annot"><span class="annottext">pprRFC :: HsRecFieldContext -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#pprRFC"><span class="hs-identifier hs-var hs-var">pprRFC</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.Pat.html#HsRecFieldCon"><span class="hs-identifier hs-type">HsRecFieldCon</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;construction&quot;</span></span><span>
</span><span id="line-816"></span><span class="annot"><a href="GHC.Rename.Pat.html#pprRFC"><span class="hs-identifier hs-var">pprRFC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.Pat.html#HsRecFieldPat"><span class="hs-identifier hs-type">HsRecFieldPat</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;pattern&quot;</span></span><span>
</span><span id="line-817"></span><span class="annot"><a href="GHC.Rename.Pat.html#pprRFC"><span class="hs-identifier hs-var">pprRFC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.Pat.html#HsRecFieldUpd"><span class="hs-identifier hs-type">HsRecFieldUpd</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;update&quot;</span></span><span>
</span><span id="line-818"></span><span>
</span><span id="line-819"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsubsection{Literals}
*                                                                      *
************************************************************************

When literals occur we have to make sure
that the types and classes they involve
are made available.
-}</span><span>
</span><span id="line-830"></span><span>
</span><span id="line-831"></span><span id="local-6989586621681128785"><span class="annot"><a href="GHC.Rename.Pat.html#rnLit"><span class="hs-identifier hs-type">rnLit</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Lit.html#HsLit"><span class="hs-identifier hs-type">HsLit</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128785"><span class="hs-identifier hs-type">p</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-832"></span><span id="rnLit"><span class="annot"><span class="annottext">rnLit :: forall p. HsLit p -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Rename.Pat.html#rnLit"><span class="hs-identifier hs-var hs-var">rnLit</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Lit.html#HsChar"><span class="hs-identifier hs-type">HsChar</span></a></span><span> </span><span class="annot"><span class="annottext">XHsChar p
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681127901"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621681127901"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; MsgDoc -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
</span><a href="GHC.Tc.Utils.Monad.html#checkErr"><span class="hs-identifier hs-var">checkErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="GHC.Types.Literal.html#inCharRange"><span class="hs-identifier hs-var">inCharRange</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621681127901"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#bogusCharError"><span class="hs-identifier hs-var">bogusCharError</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621681127901"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-833"></span><span class="annot"><a href="GHC.Rename.Pat.html#rnLit"><span class="hs-identifier hs-var">rnLit</span></a></span><span> </span><span class="annot"><span class="annottext">HsLit p
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IOEnv (Env TcGblEnv TcLclEnv) ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-834"></span><span>
</span><span id="line-835"></span><span class="hs-comment">-- Turn a Fractional-looking literal which happens to be an integer into an</span><span>
</span><span id="line-836"></span><span class="hs-comment">-- Integer-looking literal.</span><span>
</span><span id="line-837"></span><span class="annot"><a href="GHC.Rename.Pat.html#generalizeOverLitVal"><span class="hs-identifier hs-type">generalizeOverLitVal</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Lit.html#OverLitVal"><span class="hs-identifier hs-type">OverLitVal</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Lit.html#OverLitVal"><span class="hs-identifier hs-type">OverLitVal</span></a></span><span>
</span><span id="line-838"></span><span id="generalizeOverLitVal"><span class="annot"><span class="annottext">generalizeOverLitVal :: OverLitVal -&gt; OverLitVal
</span><a href="GHC.Rename.Pat.html#generalizeOverLitVal"><span class="hs-identifier hs-var hs-var">generalizeOverLitVal</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Lit.html#HsFractional"><span class="hs-identifier hs-type">HsFractional</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Basic.html#FL"><span class="hs-identifier hs-type">FL</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">fl_text :: FractionalLit -&gt; SourceText
</span><a href="GHC.Types.Basic.html#fl_text"><span class="hs-identifier hs-var">fl_text</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621681127895"><span class="annot"><span class="annottext">SourceText
</span><a href="#local-6989586621681127895"><span class="hs-identifier hs-var">src</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">fl_neg :: FractionalLit -&gt; Bool
</span><a href="GHC.Types.Basic.html#fl_neg"><span class="hs-identifier hs-var">fl_neg</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621681127893"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127893"><span class="hs-identifier hs-var">neg</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">fl_value :: FractionalLit -&gt; Rational
</span><a href="GHC.Types.Basic.html#fl_value"><span class="hs-identifier hs-var">fl_value</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621681127891"><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681127891"><span class="hs-identifier hs-var">val</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-839"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Rational -&gt; Integer
forall a. Ratio a -&gt; a
</span><a href="../../base/src/GHC.Real.html#denominator"><span class="hs-identifier hs-var">denominator</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681127891"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IntegralLit -&gt; OverLitVal
</span><a href="GHC.Hs.Lit.html#HsIntegral"><span class="hs-identifier hs-var">HsIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IL :: SourceText -&gt; Bool -&gt; Integer -&gt; IntegralLit
</span><a href="GHC.Types.Basic.html#IL"><span class="hs-identifier hs-type">IL</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">il_text :: SourceText
</span><a href="GHC.Types.Basic.html#il_text"><span class="hs-identifier hs-var">il_text</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">SourceText
</span><a href="#local-6989586621681127895"><span class="hs-identifier hs-var">src</span></a></span><span>
</span><span id="line-840"></span><span>                                            </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">il_neg :: Bool
</span><a href="GHC.Types.Basic.html#il_neg"><span class="hs-identifier hs-var">il_neg</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127893"><span class="hs-identifier hs-var">neg</span></a></span><span>
</span><span id="line-841"></span><span>                                            </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">il_value :: Integer
</span><a href="GHC.Types.Basic.html#il_value"><span class="hs-identifier hs-var">il_value</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">Rational -&gt; Integer
forall a. Ratio a -&gt; a
</span><a href="../../base/src/GHC.Real.html#numerator"><span class="hs-identifier hs-var">numerator</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681127891"><span class="hs-identifier hs-var">val</span></a></span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-842"></span><span class="annot"><a href="GHC.Rename.Pat.html#generalizeOverLitVal"><span class="hs-identifier hs-var">generalizeOverLitVal</span></a></span><span> </span><span id="local-6989586621681127883"><span class="annot"><span class="annottext">OverLitVal
</span><a href="#local-6989586621681127883"><span class="hs-identifier hs-var">lit</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OverLitVal
</span><a href="#local-6989586621681127883"><span class="hs-identifier hs-var">lit</span></a></span><span>
</span><span id="line-843"></span><span>
</span><span id="line-844"></span><span id="local-6989586621681128648"><span class="annot"><a href="GHC.Rename.Pat.html#isNegativeZeroOverLit"><span class="hs-identifier hs-type">isNegativeZeroOverLit</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Lit.html#HsOverLit"><span class="hs-identifier hs-type">HsOverLit</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128648"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-845"></span><span id="isNegativeZeroOverLit"><span class="annot"><span class="annottext">isNegativeZeroOverLit :: forall t. HsOverLit t -&gt; Bool
</span><a href="GHC.Rename.Pat.html#isNegativeZeroOverLit"><span class="hs-identifier hs-var hs-var">isNegativeZeroOverLit</span></a></span></span><span> </span><span id="local-6989586621681127873"><span class="annot"><span class="annottext">HsOverLit t
</span><a href="#local-6989586621681127873"><span class="hs-identifier hs-var">lit</span></a></span></span><span>
</span><span id="line-846"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HsOverLit t -&gt; OverLitVal
forall p. HsOverLit p -&gt; OverLitVal
</span><a href="GHC.Hs.Lit.html#ol_val"><span class="hs-identifier hs-var hs-var">ol_val</span></a></span><span> </span><span class="annot"><span class="annottext">HsOverLit t
</span><a href="#local-6989586621681127873"><span class="hs-identifier hs-var">lit</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-847"></span><span>        </span><span class="annot"><a href="GHC.Hs.Lit.html#HsIntegral"><span class="hs-identifier hs-type">HsIntegral</span></a></span><span> </span><span id="local-6989586621681127871"><span class="annot"><span class="annottext">IntegralLit
</span><a href="#local-6989586621681127871"><span class="hs-identifier hs-var">i</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">IntegralLit -&gt; Integer
</span><a href="GHC.Types.Basic.html#il_value"><span class="hs-identifier hs-var hs-var">il_value</span></a></span><span> </span><span class="annot"><span class="annottext">IntegralLit
</span><a href="#local-6989586621681127871"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">IntegralLit -&gt; Bool
</span><a href="GHC.Types.Basic.html#il_neg"><span class="hs-identifier hs-var hs-var">il_neg</span></a></span><span> </span><span class="annot"><span class="annottext">IntegralLit
</span><a href="#local-6989586621681127871"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-848"></span><span>        </span><span class="annot"><a href="GHC.Hs.Lit.html#HsFractional"><span class="hs-identifier hs-type">HsFractional</span></a></span><span> </span><span id="local-6989586621681127870"><span class="annot"><span class="annottext">FractionalLit
</span><a href="#local-6989586621681127870"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Rational -&gt; Rational -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">FractionalLit -&gt; Rational
</span><a href="GHC.Types.Basic.html#fl_value"><span class="hs-identifier hs-var hs-var">fl_value</span></a></span><span> </span><span class="annot"><span class="annottext">FractionalLit
</span><a href="#local-6989586621681127870"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">FractionalLit -&gt; Bool
</span><a href="GHC.Types.Basic.html#fl_neg"><span class="hs-identifier hs-var hs-var">fl_neg</span></a></span><span> </span><span class="annot"><span class="annottext">FractionalLit
</span><a href="#local-6989586621681127870"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-849"></span><span>        </span><span class="annot"><span class="annottext">OverLitVal
</span><span class="hs-identifier">_</span></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-850"></span><span>
</span><span id="line-851"></span><span class="hs-comment">{-
Note [Negative zero]
~~~~~~~~~~~~~~~~~~~~~~~~~
There were problems with negative zero in conjunction with Negative Literals
extension. Numeric literal value is contained in Integer and Rational types
inside IntegralLit and FractionalLit. These types cannot represent negative
zero value. So we had to add explicit field 'neg' which would hold information
about literal sign. Here in rnOverLit we use it to detect negative zeroes and
in this case return not only literal itself but also negateName so that users
can apply it explicitly. In this case it stays negative zero.  #13211
-}</span><span>
</span><span id="line-862"></span><span>
</span><span id="line-863"></span><span id="local-6989586621681128780"><span class="annot"><a href="GHC.Rename.Pat.html#rnOverLit"><span class="hs-identifier hs-type">rnOverLit</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Lit.html#HsOverLit"><span class="hs-identifier hs-type">HsOverLit</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128780"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-864"></span><span>             </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Lit.html#HsOverLit"><span class="hs-identifier hs-type">HsOverLit</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsExpr"><span class="hs-identifier hs-type">HsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-865"></span><span id="rnOverLit"><span class="annot"><span class="annottext">rnOverLit :: forall t.
HsOverLit t
-&gt; RnM
     ((HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))),
      FreeVars)
</span><a href="GHC.Rename.Pat.html#rnOverLit"><span class="hs-identifier hs-var hs-var">rnOverLit</span></a></span></span><span> </span><span id="local-6989586621681127862"><span class="annot"><span class="annottext">HsOverLit t
</span><a href="#local-6989586621681127862"><span class="hs-identifier hs-var">origLit</span></a></span></span><span>
</span><span id="line-866"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681127861"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127861"><span class="hs-identifier hs-var">opt_NumDecimals</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; RnM Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#NumDecimals"><span class="hs-identifier hs-var">LangExt.NumDecimals</span></a></span><span>
</span><span id="line-867"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681127859"><span class="annot"><span class="annottext">lit :: HsOverLit t
</span><a href="#local-6989586621681127859"><span class="hs-identifier hs-var">lit</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Lit.html#OverLit"><span class="hs-identifier hs-type">OverLit</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">ol_val :: forall p. HsOverLit p -&gt; OverLitVal
</span><a href="GHC.Hs.Lit.html#ol_val"><span class="hs-identifier hs-var">ol_val</span></a></span><span class="hs-glyph">=</span><span id="local-6989586621681127857"><span class="annot"><span class="annottext">OverLitVal
</span><a href="#local-6989586621681127857"><span class="hs-identifier hs-var">val</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-868"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681127861"><span class="hs-identifier hs-var">opt_NumDecimals</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsOverLit t
</span><a href="#local-6989586621681127862"><span class="hs-identifier hs-var">origLit</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">ol_val :: OverLitVal
</span><a href="GHC.Hs.Lit.html#ol_val"><span class="hs-identifier hs-var">ol_val</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OverLitVal -&gt; OverLitVal
</span><a href="GHC.Rename.Pat.html#generalizeOverLitVal"><span class="hs-identifier hs-var">generalizeOverLitVal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsOverLit t -&gt; OverLitVal
forall p. HsOverLit p -&gt; OverLitVal
</span><a href="GHC.Hs.Lit.html#ol_val"><span class="hs-identifier hs-var hs-var">ol_val</span></a></span><span> </span><span class="annot"><span class="annottext">HsOverLit t
</span><a href="#local-6989586621681127862"><span class="hs-identifier hs-var">origLit</span></a></span><span class="hs-special">)</span><span class="hs-special">}</span><span>
</span><span id="line-869"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsOverLit t
</span><a href="#local-6989586621681127862"><span class="hs-identifier hs-var">origLit</span></a></span><span>
</span><span id="line-870"></span><span>          </span><span class="hs-special">}</span><span>
</span><span id="line-871"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681127856"><span class="annot"><span class="annottext">std_name :: Name
</span><a href="#local-6989586621681127856"><span class="hs-identifier hs-var hs-var">std_name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OverLitVal -&gt; Name
</span><a href="GHC.Tc.Utils.Zonk.html#hsOverLitName"><span class="hs-identifier hs-var">hsOverLitName</span></a></span><span> </span><span class="annot"><span class="annottext">OverLitVal
</span><a href="#local-6989586621681127857"><span class="hs-identifier hs-var">val</span></a></span><span>
</span><span id="line-872"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681127855"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681127855"><span class="hs-identifier hs-var">from_thing_name</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681127854"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681127854"><span class="hs-identifier hs-var">fvs1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Name -&gt; RnM (Name, FreeVars)
</span><a href="GHC.Rename.Env.html#lookupSyntaxName"><span class="hs-identifier hs-var">lookupSyntaxName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681127856"><span class="hs-identifier hs-var">std_name</span></a></span><span>
</span><span id="line-873"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681127852"><span class="annot"><span class="annottext">rebindable :: Bool
</span><a href="#local-6989586621681127852"><span class="hs-identifier hs-var hs-var">rebindable</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681127855"><span class="hs-identifier hs-var">from_thing_name</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681127856"><span class="hs-identifier hs-var">std_name</span></a></span><span>
</span><span id="line-874"></span><span>              </span><span id="local-6989586621681127850"><span class="annot"><span class="annottext">lit' :: HsOverLit (GhcPass 'Renamed)
</span><a href="#local-6989586621681127850"><span class="hs-identifier hs-var hs-var">lit'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsOverLit t
</span><a href="#local-6989586621681127859"><span class="hs-identifier hs-var">lit</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ol_witness :: HsExpr (GhcPass 'Renamed)
</span><a href="GHC.Hs.Lit.html#ol_witness"><span class="hs-identifier hs-var">ol_witness</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdP (GhcPass 'Renamed) -&gt; HsExpr (GhcPass 'Renamed)
forall (id :: Pass). IdP (GhcPass id) -&gt; HsExpr (GhcPass id)
</span><a href="GHC.Hs.Utils.html#nl_HsVar"><span class="hs-identifier hs-var">nl_HsVar</span></a></span><span> </span><span class="annot"><span class="annottext">Name
IdP (GhcPass 'Renamed)
</span><a href="#local-6989586621681127855"><span class="hs-identifier hs-var">from_thing_name</span></a></span><span>
</span><span id="line-875"></span><span>                         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ol_ext :: XOverLit (GhcPass 'Renamed)
</span><a href="GHC.Hs.Lit.html#ol_ext"><span class="hs-identifier hs-var">ol_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
XOverLit (GhcPass 'Renamed)
</span><a href="#local-6989586621681127852"><span class="hs-identifier hs-var">rebindable</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-876"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">HsOverLit (GhcPass 'Renamed) -&gt; Bool
forall t. HsOverLit t -&gt; Bool
</span><a href="GHC.Rename.Pat.html#isNegativeZeroOverLit"><span class="hs-identifier hs-var">isNegativeZeroOverLit</span></a></span><span> </span><span class="annot"><span class="annottext">HsOverLit (GhcPass 'Renamed)
</span><a href="#local-6989586621681127850"><span class="hs-identifier hs-var">lit'</span></a></span><span>
</span><span id="line-877"></span><span>          </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681127846"><span class="annot"><span class="annottext">HsExpr (GhcPass 'Renamed)
</span><a href="#local-6989586621681127846"><span class="hs-identifier hs-var">negate_name</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681127845"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681127845"><span class="hs-identifier hs-var">fvs2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Name -&gt; RnM (HsExpr (GhcPass 'Renamed), FreeVars)
</span><a href="GHC.Rename.Env.html#lookupSyntaxExpr"><span class="hs-identifier hs-var">lookupSyntaxExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Names.html#negateName"><span class="hs-identifier hs-var">negateName</span></a></span><span>
</span><span id="line-878"></span><span>                  </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">((HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))),
 FreeVars)
-&gt; RnM
     ((HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))),
      FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsOverLit (GhcPass 'Renamed)
</span><a href="#local-6989586621681127850"><span class="hs-identifier hs-var">lit'</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ol_val :: OverLitVal
</span><a href="GHC.Hs.Lit.html#ol_val"><span class="hs-identifier hs-var">ol_val</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OverLitVal -&gt; OverLitVal
</span><a href="GHC.Hs.Lit.html#negateOverLitVal"><span class="hs-identifier hs-var">negateOverLitVal</span></a></span><span> </span><span class="annot"><span class="annottext">OverLitVal
</span><a href="#local-6989586621681127857"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HsExpr (GhcPass 'Renamed) -&gt; Maybe (HsExpr (GhcPass 'Renamed))
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr (GhcPass 'Renamed)
</span><a href="#local-6989586621681127846"><span class="hs-identifier hs-var">negate_name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-879"></span><span>                                  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681127854"><span class="hs-identifier hs-var">fvs1</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; FreeVars -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#plusFV"><span class="hs-operator hs-var">`plusFV`</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681127845"><span class="hs-identifier hs-var">fvs2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-880"></span><span>          </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">((HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))),
 FreeVars)
-&gt; RnM
     ((HsOverLit (GhcPass 'Renamed), Maybe (HsExpr (GhcPass 'Renamed))),
      FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsOverLit (GhcPass 'Renamed)
</span><a href="#local-6989586621681127850"><span class="hs-identifier hs-var">lit'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (HsExpr (GhcPass 'Renamed))
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681127854"><span class="hs-identifier hs-var">fvs1</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-881"></span><span>
</span><span id="line-882"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsubsection{Errors}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-889"></span><span>
</span><span id="line-890"></span><span id="local-6989586621681127842"><span class="annot"><a href="GHC.Rename.Pat.html#patSigErr"><span class="hs-identifier hs-type">patSigErr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681127842"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681127842"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span><span>
</span><span id="line-891"></span><span id="patSigErr"><span class="annot"><span class="annottext">patSigErr :: forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#patSigErr"><span class="hs-identifier hs-var hs-var">patSigErr</span></a></span></span><span> </span><span id="local-6989586621681127839"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681127839"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-892"></span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Illegal signature in pattern:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681127839"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-893"></span><span>        </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Use ScopedTypeVariables to permit it&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-894"></span><span>
</span><span id="line-895"></span><span class="annot"><a href="GHC.Rename.Pat.html#bogusCharError"><span class="hs-identifier hs-type">bogusCharError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-896"></span><span id="bogusCharError"><span class="annot"><span class="annottext">bogusCharError :: Char -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#bogusCharError"><span class="hs-identifier hs-var hs-var">bogusCharError</span></a></span></span><span> </span><span id="local-6989586621681127837"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621681127837"><span class="hs-identifier hs-var">c</span></a></span></span><span>
</span><span id="line-897"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;character literal out of range: '\\&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621681127837"><span class="hs-identifier hs-var">c</span></a></span><span>  </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\''</span></span><span>
</span><span id="line-898"></span><span>
</span><span id="line-899"></span><span class="annot"><a href="GHC.Rename.Pat.html#badViewPat"><span class="hs-identifier hs-type">badViewPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-900"></span><span id="badViewPat"><span class="annot"><span class="annottext">badViewPat :: Pat GhcPs -&gt; MsgDoc
</span><a href="GHC.Rename.Pat.html#badViewPat"><span class="hs-identifier hs-var hs-var">badViewPat</span></a></span></span><span> </span><span id="local-6989586621681127834"><span class="annot"><span class="annottext">Pat GhcPs
</span><a href="#local-6989586621681127834"><span class="hs-identifier hs-var">pat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Illegal view pattern: &quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Pat GhcPs -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Pat GhcPs
</span><a href="#local-6989586621681127834"><span class="hs-identifier hs-var">pat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-901"></span><span>                       </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Use ViewPatterns to enable view patterns&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-902"></span></pre></body></html>